X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fgcrypt%2Fcrypto.c;h=815bedf1ba96366e5434afa8233cb2b3d1495a97;hb=c45a3fd7319d03bd147448a017f5aaed3b46fdfe;hp=dc92b3e0eeb27e9e35fed40560953d4c9711657b;hpb=268c8545aaf83b7433f43402f5c77e39e20006ef;p=tinc diff --git a/src/gcrypt/crypto.c b/src/gcrypt/crypto.c index dc92b3e0..815bedf1 100644 --- a/src/gcrypt/crypto.c +++ b/src/gcrypt/crypto.c @@ -1,34 +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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ - -#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); }