summaryrefslogtreecommitdiff
path: root/lib/crypto-backend.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2014-12-11 10:15:54 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2014-12-11 10:17:03 +0100
commit12676823f0cbf50d6ed95feca3350b3db857ef2b (patch)
tree67641c5806b9ad1ad598fe1443073901a6705487 /lib/crypto-backend.c
parent7d5b730e918cda5aee86ba0c92b3298862277c65 (diff)
downloadgnutls-12676823f0cbf50d6ed95feca3350b3db857ef2b.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.
Diffstat (limited to 'lib/crypto-backend.c')
-rw-r--r--lib/crypto-backend.c2
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;