From: Nikos Mavrogiannopoulos Date: Thu, 11 Dec 2014 09:15:54 +0000 (+0100) Subject: Allow a random generator with the same priority to re-register X-Git-Tag: gnutls_3_4_0~482 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12676823f0cbf50d6ed95feca3350b3db857ef2b;p=thirdparty%2Fgnutls.git Allow a random generator with the same priority to re-register That corrects an issue where the library is deinitialized, and reinitialization wouldn't register the same rnd module. Reported by Stanislav Zidek. --- diff --git a/lib/crypto-backend.c b/lib/crypto-backend.c index 8840b1c123..2132b5334e 100644 --- a/lib/crypto-backend.c +++ b/lib/crypto-backend.c @@ -193,7 +193,7 @@ const gnutls_crypto_cipher_st int gnutls_crypto_rnd_register(int priority, const gnutls_crypto_rnd_st * s) { - if (crypto_rnd_prio > priority) { + if (crypto_rnd_prio >= priority) { memcpy(&_gnutls_rnd_ops, s, sizeof(*s)); crypto_rnd_prio = priority; return 0;