From e6cd8e8112174792a3847ebe41d1e136f5f89658 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Thu, 11 May 2017 14:51:27 +0200 Subject: [PATCH] fix failing tests with pthreads enabled --- tests/pkcs_1_eme_test.c | 2 ++ tests/pkcs_1_oaep_test.c | 2 ++ tests/pkcs_1_pss_test.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/tests/pkcs_1_eme_test.c b/tests/pkcs_1_eme_test.c index e709156..425c883 100644 --- a/tests/pkcs_1_eme_test.c +++ b/tests/pkcs_1_eme_test.c @@ -48,7 +48,9 @@ int pkcs_1_eme_test(void) mp_clear_multi(key->d, key->e, key->N, key->dQ, key->dP, key->qP, key->p, key->q, NULL); } /* for */ +#ifndef LTC_PTHREAD unregister_prng(&no_prng_desc); +#endif return 0; } diff --git a/tests/pkcs_1_oaep_test.c b/tests/pkcs_1_oaep_test.c index ae1aee3..8be42d3 100644 --- a/tests/pkcs_1_oaep_test.c +++ b/tests/pkcs_1_oaep_test.c @@ -48,7 +48,9 @@ int pkcs_1_oaep_test(void) mp_clear_multi(key->d, key->e, key->N, key->dQ, key->dP, key->qP, key->p, key->q, NULL); } /* for */ +#ifndef LTC_PTHREAD unregister_prng(&no_prng_desc); +#endif return 0; } diff --git a/tests/pkcs_1_pss_test.c b/tests/pkcs_1_pss_test.c index 76822c9..c7b352b 100644 --- a/tests/pkcs_1_pss_test.c +++ b/tests/pkcs_1_pss_test.c @@ -49,7 +49,9 @@ int pkcs_1_pss_test(void) mp_clear_multi(key->d, key->e, key->N, key->dQ, key->dP, key->qP, key->p, key->q, NULL); } /* for */ +#ifndef LTC_PTHREAD unregister_prng(&no_prng_desc); +#endif return 0; }