diff options
author | David Benjamin <davidben@chromium.org> | 2015-08-22 01:05:11 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-08-25 02:37:58 +0300 |
commit | 61821bf149f774e7110ab3a76cc5e1e32fa5c2c7 (patch) | |
tree | 08af0781a2e401a31b8160281f1d9ddf61d5c14b /crypto/test | |
parent | be8a869d9642fdec979f8c4006174968bb42462e (diff) |
Add EVP_AEAD_CTX_zero.
Match the other stack-allocated types in that we expose a wrapper function to
get them into the zero state. Makes it more amenable to templates like
ScopedOpenSSLContext.
Change-Id: Ibc7b2b1bc0421ce5ccc84760c78c0b143441ab0f
Reviewed-on: https://boringssl-review.googlesource.com/5753
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/test')
-rw-r--r-- | crypto/test/scoped_types.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/test/scoped_types.h b/crypto/test/scoped_types.h index c5c8cfe2..d9eaad27 100644 --- a/crypto/test/scoped_types.h +++ b/crypto/test/scoped_types.h @@ -18,6 +18,7 @@ #include <stdint.h> #include <stdio.h> +#include <openssl/aead.h> #include <openssl/bio.h> #include <openssl/bn.h> #include <openssl/cmac.h> @@ -115,6 +116,9 @@ using ScopedX509_ALGOR = ScopedOpenSSLType<X509_ALGOR, X509_ALGOR_free>; using ScopedX509Stack = ScopedOpenSSLStack<STACK_OF(X509), X509, X509_free>; +using ScopedEVP_AEAD_CTX = ScopedOpenSSLContext<EVP_AEAD_CTX, void, + EVP_AEAD_CTX_zero, + EVP_AEAD_CTX_cleanup>; using ScopedEVP_CIPHER_CTX = ScopedOpenSSLContext<EVP_CIPHER_CTX, int, EVP_CIPHER_CTX_init, EVP_CIPHER_CTX_cleanup>; |