diff options
author | tb <> | 2021-11-30 18:20:06 +0000 |
---|---|---|
committer | tb <> | 2021-11-30 18:20:06 +0000 |
commit | 1cc1c6803e5930d767178947d69dfa9e3d8a567b (patch) | |
tree | c85f93d939bb0ad7346f9e378c83e912b4c0ca85 | |
parent | 4f56e5859ceef7b0a2a1a03efbe40958cb60302e (diff) | |
download | openbsd-1cc1c6803e5930d767178947d69dfa9e3d8a567b.tar.gz openbsd-1cc1c6803e5930d767178947d69dfa9e3d8a567b.tar.bz2 openbsd-1cc1c6803e5930d767178947d69dfa9e3d8a567b.zip |
Provide EVP_CTRL_AEAD_* defines.
This commit adds generic EVP_CTRL_AEAD_{SET,GET}_TAG and _SET_IVLEN
defines and aliases the GCM and CCM versions to those.
This is the publicly visible part of OpenSSL's e640fa02005.
ok inoguchi jsing
-rw-r--r-- | src/lib/libcrypto/evp/evp.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/lib/libcrypto/evp/evp.h b/src/lib/libcrypto/evp/evp.h index 3af94350f7..c142b58a38 100644 --- a/src/lib/libcrypto/evp/evp.h +++ b/src/lib/libcrypto/evp/evp.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: evp.h,v 1.85 2021/11/01 08:14:36 tb Exp $ */ | 1 | /* $OpenBSD: evp.h,v 1.86 2021/11/30 18:20:06 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -375,14 +375,17 @@ struct evp_cipher_st { | |||
375 | #define EVP_CTRL_RAND_KEY 0x6 | 375 | #define EVP_CTRL_RAND_KEY 0x6 |
376 | #define EVP_CTRL_PBE_PRF_NID 0x7 | 376 | #define EVP_CTRL_PBE_PRF_NID 0x7 |
377 | #define EVP_CTRL_COPY 0x8 | 377 | #define EVP_CTRL_COPY 0x8 |
378 | #define EVP_CTRL_GCM_SET_IVLEN 0x9 | 378 | #define EVP_CTRL_AEAD_SET_IVLEN 0x9 |
379 | #define EVP_CTRL_GCM_GET_TAG 0x10 | 379 | #define EVP_CTRL_AEAD_GET_TAG 0x10 |
380 | #define EVP_CTRL_GCM_SET_TAG 0x11 | 380 | #define EVP_CTRL_AEAD_SET_TAG 0x11 |
381 | #define EVP_CTRL_GCM_SET_IVLEN EVP_CTRL_AEAD_SET_IVLEN | ||
382 | #define EVP_CTRL_GCM_GET_TAG EVP_CTRL_AEAD_GET_TAG | ||
383 | #define EVP_CTRL_GCM_SET_TAG EVP_CTRL_AEAD_SET_TAG | ||
381 | #define EVP_CTRL_GCM_SET_IV_FIXED 0x12 | 384 | #define EVP_CTRL_GCM_SET_IV_FIXED 0x12 |
382 | #define EVP_CTRL_GCM_IV_GEN 0x13 | 385 | #define EVP_CTRL_GCM_IV_GEN 0x13 |
383 | #define EVP_CTRL_CCM_SET_IVLEN EVP_CTRL_GCM_SET_IVLEN | 386 | #define EVP_CTRL_CCM_SET_IVLEN EVP_CTRL_AEAD_SET_IVLEN |
384 | #define EVP_CTRL_CCM_GET_TAG EVP_CTRL_GCM_GET_TAG | 387 | #define EVP_CTRL_CCM_GET_TAG EVP_CTRL_AEAD_GET_TAG |
385 | #define EVP_CTRL_CCM_SET_TAG EVP_CTRL_GCM_SET_TAG | 388 | #define EVP_CTRL_CCM_SET_TAG EVP_CTRL_AEAD_SET_TAG |
386 | #define EVP_CTRL_CCM_SET_L 0x14 | 389 | #define EVP_CTRL_CCM_SET_L 0x14 |
387 | #define EVP_CTRL_CCM_SET_MSGLEN 0x15 | 390 | #define EVP_CTRL_CCM_SET_MSGLEN 0x15 |
388 | /* AEAD cipher deduces payload length and returns number of bytes | 391 | /* AEAD cipher deduces payload length and returns number of bytes |