Redirect clone digests to FIPS module for FIPS builds.

This commit is contained in:
Dr. Stephen Henson 2011-06-01 14:28:21 +00:00
parent 65300dcfb0
commit 9f2c8eb2a1
3 changed files with 23 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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