diff options
Diffstat (limited to 'apps/dgst.c')
-rw-r--r-- | apps/dgst.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/dgst.c b/apps/dgst.c index 8a5609f32..d471dbdab 100644 --- a/apps/dgst.c +++ b/apps/dgst.c @@ -128,6 +128,7 @@ int MAIN(int argc, char **argv) #endif char *hmac_key=NULL; char *mac_name=NULL; + int non_fips_allow = 0; STACK_OF(OPENSSL_STRING) *sigopts = NULL, *macopts = NULL; apps_startup(); @@ -220,6 +221,8 @@ int MAIN(int argc, char **argv) debug=1; else if (!strcmp(*argv,"-fips-fingerprint")) hmac_key = "etaonrishdlcupfm"; + else if (strcmp(*argv,"-non-fips-allow") == 0) + non_fips_allow=1; else if (!strcmp(*argv,"-hmac")) { if (--argc < 1) @@ -405,6 +408,13 @@ int MAIN(int argc, char **argv) goto end; } + if (non_fips_allow) + { + EVP_MD_CTX *md_ctx; + BIO_get_md_ctx(bmd,&md_ctx); + EVP_MD_CTX_set_flags(md_ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW); + } + if (hmac_key) { sigkey = EVP_PKEY_new_mac_key(EVP_PKEY_HMAC, impl, |