test/evp_test.c: allow generic AEAD ciphers to be tested.
authorAndy Polyakov <appro@openssl.org>
Wed, 9 Dec 2015 20:35:30 +0000 (21:35 +0100)
committerAndy Polyakov <appro@openssl.org>
Thu, 10 Dec 2015 11:00:46 +0000 (12:00 +0100)
Reviewed-by: Richard Levitte <levitte@openssl.org>
test/evp_test.c

index 725af8a53a15902d365e4bf6e6d897916dc8b83e..ec2283a50f3908b236704fa3ba86e07fea8d88d0 100644 (file)
@@ -774,6 +774,8 @@ static int cipher_test_init(struct evp_test *t, const char *alg)
         || EVP_CIPHER_mode(cipher) == EVP_CIPH_OCB_MODE
         || EVP_CIPHER_mode(cipher) == EVP_CIPH_CCM_MODE)
         cdat->aead = EVP_CIPHER_mode(cipher);
+    else if (EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER)
+        cdat->aead = -1;
     else
         cdat->aead = 0;