diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-12-11 10:15:54 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2015-01-05 10:31:40 +0100 |
commit | ff98394db55d883cbd9ae8f75b070658590f764b (patch) | |
tree | 83d4c77d56761641ab55daeb76d33ef064418932 | |
parent | d967c688270af84eaba806ef98238be7525e3715 (diff) | |
download | gnutls-ff98394db55d883cbd9ae8f75b070658590f764b.tar.gz |
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.
-rw-r--r-- | lib/crypto-backend.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |