diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2012-02-10 16:46:19 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2012-02-10 16:46:19 +0000 |
commit | c944a9696e67f9583fe7595740a3c5cc0a6b022c (patch) | |
tree | 098266112818b2c0b5aa4c2c78c776c543ea2930 /apps/enc.c | |
parent | 943cc09d8afc37401d2f5b8c9be10e888d4f745f (diff) |
add fips hmac option and fips blocking overrides to command line utilities
Diffstat (limited to 'apps/enc.c')
-rw-r--r-- | apps/enc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/enc.c b/apps/enc.c index 076225c4cb..719acc3250 100644 --- a/apps/enc.c +++ b/apps/enc.c @@ -129,6 +129,7 @@ int MAIN(int argc, char **argv) char *engine = NULL; #endif const EVP_MD *dgst=NULL; + int non_fips_allow = 0; apps_startup(); @@ -281,6 +282,8 @@ int MAIN(int argc, char **argv) if (--argc < 1) goto bad; md= *(++argv); } + else if (strcmp(*argv,"-non-fips-allow") == 0) + non_fips_allow = 1; else if ((argv[0][0] == '-') && ((c=EVP_get_cipherbyname(&(argv[0][1]))) != NULL)) { @@ -589,6 +592,11 @@ bad: */ BIO_get_cipher_ctx(benc, &ctx); + + if (non_fips_allow) + EVP_CIPHER_CTX_set_flags(ctx, + EVP_CIPH_FLAG_NON_FIPS_ALLOW); + if (!EVP_CipherInit_ex(ctx, cipher, NULL, NULL, NULL, enc)) { BIO_printf(bio_err, "Error setting cipher %s\n", |