summaryrefslogtreecommitdiffstats
path: root/crypto/rsa/rsa_eay.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2011-04-22 11:12:56 +0000
committerDr. Stephen Henson <steve@openssl.org>2011-04-22 11:12:56 +0000
commit74fac927b0b7d89aa6cdb88b12669e1cd8f4e841 (patch)
tree1d355c3255bd229e2312dddf326a54ad6033b66c /crypto/rsa/rsa_eay.c
parentda9ead8db245e70b153faaa10f8fce3b704aa105 (diff)
Return errors instead of aborting when selftest fails.
Diffstat (limited to 'crypto/rsa/rsa_eay.c')
-rw-r--r--crypto/rsa/rsa_eay.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/rsa/rsa_eay.c b/crypto/rsa/rsa_eay.c
index 865fb6a269..d47f64e75d 100644
--- a/crypto/rsa/rsa_eay.c
+++ b/crypto/rsa/rsa_eay.c
@@ -937,7 +937,11 @@ err:
static int RSA_eay_init(RSA *rsa)
{
#ifdef OPENSSL_FIPS
- FIPS_selftest_check();
+ if(FIPS_selftest_failed())
+ {
+ FIPSerr(FIPS_F_RSA_EAY_INIT,FIPS_R_FIPS_SELFTEST_FAILED);
+ return 0;
+ }
#endif
rsa->flags|=RSA_FLAG_CACHE_PUBLIC|RSA_FLAG_CACHE_PRIVATE;
return(1);