Redirect clone digests to FIPS module for FIPS builds.
authorDr. Stephen Henson <steve@openssl.org>
Wed, 1 Jun 2011 14:28:21 +0000 (14:28 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 1 Jun 2011 14:28:21 +0000 (14:28 +0000)
crypto/evp/m_dss.c
crypto/evp/m_dss1.c
crypto/evp/m_ecdsa.c

index 48c2689..192a298 100644 (file)
 #endif
 
 #ifndef OPENSSL_NO_SHA
+#ifdef OPENSSL_FIPS
+#include <openssl/fips.h>
+
+const EVP_MD *EVP_dss(void) { return FIPS_evp_dss(); }
+
+#else
 
 static int init(EVP_MD_CTX *ctx)
        { return SHA1_Init(ctx->md_data); }
@@ -97,3 +103,4 @@ const EVP_MD *EVP_dss(void)
        return(&dsa_md);
        }
 #endif
+#endif
index 4f03fb7..b730c6e 100644 (file)
 #include <openssl/dsa.h>
 #endif
 
+#ifdef OPENSSL_FIPS 
+#include <openssl/fips.h>
+
+const EVP_MD *EVP_dss1(void) { return FIPS_evp_dss1(); }
+
+#else
+
 static int init(EVP_MD_CTX *ctx)
        { return SHA1_Init(ctx->md_data); }
 
@@ -98,3 +105,4 @@ const EVP_MD *EVP_dss1(void)
        return(&dss1_md);
        }
 #endif
+#endif
index 8d87a49..1e64a59 100644 (file)
 #include <openssl/x509.h>
 
 #ifndef OPENSSL_NO_SHA
+#ifdef OPENSSL_FIPS
+#include <openssl/fips.h>
+
+const EVP_MD *EVP_ecdsa(void) { return FIPS_evp_ecdsa(); }
+
+#else
+
 static int init(EVP_MD_CTX *ctx)
        { return SHA1_Init(ctx->md_data); }
 
@@ -146,3 +153,4 @@ const EVP_MD *EVP_ecdsa(void)
        return(&ecdsa_md);
        }
 #endif
+#endif