summaryrefslogtreecommitdiffstats
path: root/crypto/evp
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2011-07-21 19:22:57 +0000
committerAndy Polyakov <appro@openssl.org>2011-07-21 19:22:57 +0000
commit90f3e4cf053ff1a9fcaec0899ffc5428f7cff28e (patch)
treed3676121180e0ad767a1eb43491e5c4694a41a4d /crypto/evp
parent7bd8bf58bba469038f8573ee0e819f0a888f675f (diff)
Back-port TLS AEAD framework [from HEAD].
Diffstat (limited to 'crypto/evp')
-rw-r--r--crypto/evp/evp.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/crypto/evp/evp.h b/crypto/evp/evp.h
index b672d01964..fb651b7ea5 100644
--- a/crypto/evp/evp.h
+++ b/crypto/evp/evp.h
@@ -361,6 +361,7 @@ struct evp_cipher_st
* as finalisation.
*/
#define EVP_CIPH_FLAG_CUSTOM_CIPHER 0x100000
+#define EVP_CIPH_FLAG_AEAD_CIPHER 0x200000
/* ctrl() values */
@@ -383,6 +384,14 @@ struct evp_cipher_st
#define EVP_CTRL_CCM_SET_TAG EVP_CTRL_GCM_SET_TAG
#define EVP_CTRL_CCM_SET_L 0x14
#define EVP_CTRL_CCM_SET_MSGLEN 0x15
+/* AEAD cipher deduces payload length and returns number of bytes
+ * required to store MAC and eventual padding. Subsequent call to
+ * EVP_Cipher even appends/verifies MAC.
+ */
+#define EVP_CTRL_AEAD_TLS1_AAD 0x16
+/* Used by composite AEAD ciphers, no-op in GCM, CCM... */
+#define EVP_CTRL_AEAD_SET_MAC_KEY 0x17
+
typedef struct evp_cipher_info_st
{