diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2011-06-01 14:28:21 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2011-06-01 14:28:21 +0000 |
commit | 9f2c8eb2a103e17444f48878e4bfe123c08bd265 (patch) | |
tree | 5897b08de5eb2d8903948282a99eeba2f7bd1288 | |
parent | 65300dcfb04bae643ea7b8f42ff8c8f1b1210a9e (diff) |
Redirect clone digests to FIPS module for FIPS builds.
-rw-r--r-- | crypto/evp/m_dss.c | 7 | ||||
-rw-r--r-- | crypto/evp/m_dss1.c | 8 | ||||
-rw-r--r-- | crypto/evp/m_ecdsa.c | 8 |
3 files changed, 23 insertions, 0 deletions
diff --git a/crypto/evp/m_dss.c b/crypto/evp/m_dss.c index 48c2689504..192a29884f 100644 --- a/crypto/evp/m_dss.c +++ b/crypto/evp/m_dss.c @@ -66,6 +66,12 @@ #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 diff --git a/crypto/evp/m_dss1.c b/crypto/evp/m_dss1.c index 4f03fb70e0..b730c6e222 100644 --- a/crypto/evp/m_dss1.c +++ b/crypto/evp/m_dss1.c @@ -68,6 +68,13 @@ #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 diff --git a/crypto/evp/m_ecdsa.c b/crypto/evp/m_ecdsa.c index 8d87a49ebe..1e64a593bf 100644 --- a/crypto/evp/m_ecdsa.c +++ b/crypto/evp/m_ecdsa.c @@ -116,6 +116,13 @@ #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 |