Redirect FIPS memory allocation to FIPS_malloc() routine, remove
[openssl.git] / crypto / rsa / rsa_oaep.c
index 553d212ebe9c7cdacde646a92ac0250185793df2..48cd89dd48cc30aeca24078828f50574790b02aa 100644 (file)
@@ -18,6 +18,8 @@
  * an equivalent notion.
  */
 
+#define OPENSSL_FIPSAPI
+
 
 #if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA1)
 #include <stdio.h>
 #include <openssl/rand.h>
 #include <openssl/sha.h>
 
+#ifdef OPENSSL_FIPS
+#include <openssl/fips.h>
+#endif
+
 static int MGF1(unsigned char *mask, long len,
        const unsigned char *seed, long seedlen);
 
@@ -194,7 +200,7 @@ int PKCS1_MGF1(unsigned char *mask, long len,
        int rv = -1;
 
        EVP_MD_CTX_init(&c);
-       mdlen = EVP_MD_size(dgst);
+       mdlen = M_EVP_MD_size(dgst);
        if (mdlen < 0)
                goto err;
        for (i = 0; outlen < len; i++)