Return error codes for selftest failure instead of hard assertion errors.
[openssl.git] / fips / rsa / fips_rsa_lib.c
index a37ad3e540746f40e952e275ab72df99e769ae09..77c0cb84666f4f3172c8f530ae13aeac7bd04cb6 100644 (file)
  *
  */
 
+#define OPENSSL_FIPSAPI
+
 #include <string.h>
 #include <openssl/evp.h>
 #include <openssl/rsa.h>
 #include <openssl/bn.h>
 #include <openssl/err.h>
+#include <openssl/fips.h>
 
 /* Minimal FIPS versions of FIPS_rsa_new() and FIPS_rsa_free: to
  * reduce external dependencies. 
@@ -95,7 +98,6 @@ void FIPS_rsa_free(RSA *r)
        if (r->iqmp != NULL) BN_clear_free(r->iqmp);
        if (r->blinding != NULL) BN_BLINDING_free(r->blinding);
        if (r->mt_blinding != NULL) BN_BLINDING_free(r->mt_blinding);
-       if (r->bignum_data != NULL) OPENSSL_free_locked(r->bignum_data);
        OPENSSL_free(r);
        }