Blame SOURCES/gnutls-3.3.8-rnd-reregister.patch

873a72
From b6d992d0f96f2ecd9c0a3975576e4204c66b1fc6 Mon Sep 17 00:00:00 2001
873a72
From: Nikos Mavrogiannopoulos <nmav@redhat.com>
873a72
Date: Thu, 11 Dec 2014 10:15:54 +0100
873a72
Subject: [PATCH] Allow a random generator with the same priority to
873a72
 re-register
873a72
873a72
That corrects an issue where the library is deinitialized, and
873a72
reinitialization wouldn't register the same rnd module.
873a72
Reported by Stanislav Zidek.
873a72
---
873a72
 lib/crypto-backend.c | 2 +-
873a72
 1 file changed, 1 insertion(+), 1 deletion(-)
873a72
873a72
diff --git a/lib/crypto-backend.c b/lib/crypto-backend.c
873a72
index 8840b1c..2132b53 100644
873a72
--- a/lib/crypto-backend.c
873a72
+++ b/lib/crypto-backend.c
873a72
@@ -193,7 +193,7 @@ const gnutls_crypto_cipher_st
873a72
 int
873a72
 gnutls_crypto_rnd_register(int priority, const gnutls_crypto_rnd_st * s)
873a72
 {
873a72
-	if (crypto_rnd_prio > priority) {
873a72
+	if (crypto_rnd_prio >= priority) {
873a72
 		memcpy(&_gnutls_rnd_ops, s, sizeof(*s));
873a72
 		crypto_rnd_prio = priority;
873a72
 		return 0;
873a72
-- 
873a72
1.9.3
873a72