Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/openssl/openssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorDavid von Oheimb <David.von.Oheimb@siemens.com>2018-05-10 22:14:12 +0300
committerMatt Caswell <matt@openssl.org>2018-06-18 12:45:35 +0300
commit49c9c1b3d05782fe76bef2eef8c5224baf843240 (patch)
treeb46b18ca01a027ae1960e6986c408134394538aa /apps
parentf2950a46a6217110a7f77b5acfe558a6fb4dfeeb (diff)
add 'unsupported cipher mode' diagnostics to evp_lib.c and genpkey.c
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6217)
Diffstat (limited to 'apps')
-rw-r--r--apps/genpkey.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/genpkey.c b/apps/genpkey.c
index ce6de94ff2..39fa73c91c 100644
--- a/apps/genpkey.c
+++ b/apps/genpkey.c
@@ -120,6 +120,13 @@ int genpkey_main(int argc, char **argv)
if (!opt_cipher(opt_unknown(), &cipher)
|| do_param == 1)
goto opthelp;
+ if (EVP_CIPHER_mode(cipher) == EVP_CIPH_GCM_MODE ||
+ EVP_CIPHER_mode(cipher) == EVP_CIPH_CCM_MODE ||
+ EVP_CIPHER_mode(cipher) == EVP_CIPH_XTS_MODE ||
+ EVP_CIPHER_mode(cipher) == EVP_CIPH_OCB_MODE) {
+ BIO_printf(bio_err, "%s: cipher mode not supported\n", prog);
+ goto end;
+ }
}
}
argc = opt_num_rest();