X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fgcrypt%2Fcrypto.c;h=815bedf1ba96366e5434afa8233cb2b3d1495a97;hb=72091d5c770856870bb8cd51bcc5641078c7562c;hp=946560614ff1c03c0c7b669bac18dedf41f9131e;hpb=1b8f8918360b40a2749d40355266ed7dedbe41b5;p=tinc diff --git a/src/gcrypt/crypto.c b/src/gcrypt/crypto.c index 94656061..815bedf1 100644 --- a/src/gcrypt/crypto.c +++ b/src/gcrypt/crypto.c @@ -1,36 +1,10 @@ -/* - crypto.c -- Cryptographic miscellaneous functions and initialisation - Copyright (C) 2007 Guus Sliepen - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ -*/ - -#include "system.h" +#include "../system.h" #include -#include "crypto.h" - -void crypto_init() { -} - -void crypto_exit() { -} +#include "../crypto.h" -void randomize(void *out, size_t outlen) { - gcry_create_nonce(out, outlen); +void crypto_init(void) { + gcry_control(GCRYCTL_INIT_SECMEM, 32 * 1024, 0); + gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0); }