X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fgcrypt%2Fcrypto.c;h=815bedf1ba96366e5434afa8233cb2b3d1495a97;hb=72091d5c770856870bb8cd51bcc5641078c7562c;hp=cf5d0e64d8ac0f84aa385587127b1838a54ce57e;hpb=28b7a53b693f6b4e70218a926e68a36ece54cda1;p=tinc diff --git a/src/gcrypt/crypto.c b/src/gcrypt/crypto.c index cf5d0e64..815bedf1 100644 --- a/src/gcrypt/crypto.c +++ b/src/gcrypt/crypto.c @@ -1,22 +1,3 @@ -/* - crypto.c -- Cryptographic miscellaneous functions and initialisation - Copyright (C) 2007-2022 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 @@ -24,11 +5,6 @@ #include "../crypto.h" void crypto_init(void) { -} - -void crypto_exit(void) { -} - -void randomize(void *out, size_t outlen) { - gcry_create_nonce(out, outlen); + gcry_control(GCRYCTL_INIT_SECMEM, 32 * 1024, 0); + gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0); }