EVP_MAC ctrl numbering duplicate removal.
authorPauli <paul.dale@oracle.com>
Mon, 5 Nov 2018 04:30:37 +0000 (14:30 +1000)
committerPauli <paul.dale@oracle.com>
Mon, 5 Nov 2018 21:04:36 +0000 (07:04 +1000)
Both EVP_MAC_CTRL_SET_MD and EVP_MAC_CTRL_SET_CIPHER were numbered 4.
This would preclude any future MAC from using both.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Yang <yang.yang@baishancloud.com>
(Merged from https://github.com/openssl/openssl/pull/7566)

include/openssl/evp.h

index 6661e2e..e803fa8 100644 (file)
@@ -1024,9 +1024,9 @@ void EVP_MAC_do_all_sorted(void (*fn)
 # define EVP_MAC_CTRL_SET_FLAGS         0x02 /* unsigned long */
 # define EVP_MAC_CTRL_SET_ENGINE        0x03 /* ENGINE * */
 # define EVP_MAC_CTRL_SET_MD            0x04 /* EVP_MD * */
-# define EVP_MAC_CTRL_SET_CIPHER        0x04 /* EVP_CIPHER * */
-# define EVP_MAC_CTRL_SET_SIZE          0x05 /* size_t */
-# define EVP_MAC_CTRL_SET_IV            0x06 /* unsigned char *, size_t */
+# define EVP_MAC_CTRL_SET_CIPHER        0x05 /* EVP_CIPHER * */
+# define EVP_MAC_CTRL_SET_SIZE          0x06 /* size_t */
+# define EVP_MAC_CTRL_SET_IV            0x07 /* unsigned char *, size_t */
 
 /* PKEY stuff */
 int EVP_PKEY_decrypt_old(unsigned char *dec_key,