Browse code

Moved prng_uninit out of crypto_uninit_lib

Since prng_uninit is SSL-library agnostic, but crypto_uninit_lib isn't,
the function was moved up a level.

Also removed one unused variable (j) in tls1_P_hash().

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>

Adriaan de Jong authored on 2011/11/01 00:29:14
Showing 4 changed files
... ...
@@ -1388,6 +1388,7 @@ void
1388 1388
 free_ssl_lib (void)
1389 1389
 {
1390 1390
   crypto_uninit_lib ();
1391
+  prng_uninit();
1391 1392
   EVP_cleanup ();
1392 1393
   ERR_free_strings ();
1393 1394
 }
... ...
@@ -277,8 +277,6 @@ crypto_uninit_lib (void)
277 277
       engine_initialized = false;
278 278
     }
279 279
 #endif
280
-
281
-  prng_uninit ();
282 280
 }
283 281
 
284 282
 void
... ...
@@ -69,7 +69,6 @@ crypto_init_lib (void)
69 69
 void
70 70
 crypto_uninit_lib (void)
71 71
 {
72
-  prng_uninit();
73 72
 }
74 73
 
75 74
 void
... ...
@@ -162,7 +162,8 @@ void
162 162
 free_ssl_lib ()
163 163
 {
164 164
   crypto_uninit_lib ();
165
-
165
+  prng_uninit();
166
+  
166 167
   tls_free_lib();
167 168
 }
168 169
 
... ...
@@ -1168,7 +1169,6 @@ tls1_P_hash(const md_kt_t *md_kt,
1168 1168
 {
1169 1169
   struct gc_arena gc = gc_new ();
1170 1170
   int chunk,n;
1171
-  unsigned int j;
1172 1171
   hmac_ctx_t ctx;
1173 1172
   hmac_ctx_t ctx_tmp;
1174 1173
   uint8_t A1[MAX_HMAC_KEY_LENGTH];