diff options
author | Pauli <paul.dale@oracle.com> | 2017-03-08 11:18:55 +1000 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-03-08 10:01:28 -0500 |
commit | 777f1708a88f85569304caeca197c96ef912b236 (patch) | |
tree | 2901876856f26272488c1861707c77e009a22c56 /apps | |
parent | 6aad9393680ccde591905c8d71da92a241756394 (diff) |
Limit the output of the enc -ciphers command to just the ciphers enc can
process. This means no AEAD ciphers and no XTS mode.
Update the test script that uses this output to test cipher suites to not
filter out the now missing cipher modes.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2876)
Diffstat (limited to 'apps')
-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 94c8255a77..1b4ec0bc61 100644 --- a/apps/enc.c +++ b/apps/enc.c @@ -563,10 +563,18 @@ static void show_ciphers(const OBJ_NAME *name, void *bio_) { BIO *bio = bio_; static int n; + const EVP_CIPHER *cipher; if (!islower((unsigned char)*name->name)) return; + /* Filter out ciphers that we cannot use */ + cipher = EVP_get_cipherbyname(name->name); + if (cipher == NULL || + (EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER) != 0 || + EVP_CIPHER_mode(cipher) == EVP_CIPH_XTS_MODE) + return; + BIO_printf(bio, "-%-25s", name->name); if (++n == 3) { BIO_printf(bio, "\n"); |