summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2014-12-11 10:15:54 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2015-01-05 10:31:40 +0100
commitff98394db55d883cbd9ae8f75b070658590f764b (patch)
tree83d4c77d56761641ab55daeb76d33ef064418932
parentd967c688270af84eaba806ef98238be7525e3715 (diff)
downloadgnutls-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.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;