Mark OCB as an AEAD cipher
authorMatt Caswell <matt@openssl.org>
Tue, 15 Mar 2016 12:05:16 +0000 (12:05 +0000)
committerMatt Caswell <matt@openssl.org>
Fri, 18 Mar 2016 12:05:29 +0000 (12:05 +0000)
OCB is AEAD capable but was not marked as such with the
EVP_CIPH_FLAG_AEAD_CIPHER flag.

Reviewed-by: Andy Polyakov <appro@openssl.org>
crypto/evp/e_aes.c

index 6191680097e6266c0a0159353165ab5d3a35534f..360f572731199d128d8c6da27ba78806caf83067 100644 (file)
@@ -2684,8 +2684,11 @@ static int aes_ocb_cleanup(EVP_CIPHER_CTX *c)
     return 1;
 }
 
-BLOCK_CIPHER_custom(NID_aes, 128, 16, 12, ocb, OCB, CUSTOM_FLAGS)
-    BLOCK_CIPHER_custom(NID_aes, 192, 16, 12, ocb, OCB, CUSTOM_FLAGS)
-    BLOCK_CIPHER_custom(NID_aes, 256, 16, 12, ocb, OCB, CUSTOM_FLAGS)
+BLOCK_CIPHER_custom(NID_aes, 128, 16, 12, ocb, OCB,
+                    EVP_CIPH_FLAG_AEAD_CIPHER | CUSTOM_FLAGS)
+BLOCK_CIPHER_custom(NID_aes, 192, 16, 12, ocb, OCB,
+                    EVP_CIPH_FLAG_AEAD_CIPHER | CUSTOM_FLAGS)
+BLOCK_CIPHER_custom(NID_aes, 256, 16, 12, ocb, OCB,
+                    EVP_CIPH_FLAG_AEAD_CIPHER | CUSTOM_FLAGS)
 # endif                         /* OPENSSL_NO_OCB */
 #endif