diff options
author | Adam Langley <agl@google.com> | 2015-05-06 02:36:32 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-05-08 00:13:41 +0300 |
commit | 0d107e183ecadafe7ff207914394b2291758ed82 (patch) | |
tree | c8e41e8938b66de627b867354e9c04f54820598b /crypto/test | |
parent | ae5fdd96484c7eaee858206c1f79722748b8dcc8 (diff) |
Add support for CMAC (RFC 4493).
The interface for this is very similar to upstream, but the code is
quite different.
Support for “resuming” (i.e. calling |CMAC_Final| and then computing the
CMAC for an extension of the message) has been dropped. Also, calling
|CMAC_Init| with magic argument to reset it has been replaced with
|CMAC_Reset|.
Lastly, a one-shot function has been added because it can save an
allocation and that's what most callers actually appear to want to do.
Change-Id: I9345220218bdb16ebe6ca356928d7c6f055d83f6
Reviewed-on: https://boringssl-review.googlesource.com/4630
Reviewed-by: David Benjamin <davidben@chromium.org>
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/test')
-rw-r--r-- | crypto/test/scoped_types.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/test/scoped_types.h b/crypto/test/scoped_types.h index bdb3ca7f..697dfbf3 100644 --- a/crypto/test/scoped_types.h +++ b/crypto/test/scoped_types.h @@ -19,6 +19,7 @@ #include <openssl/bio.h> #include <openssl/bn.h> +#include <openssl/cmac.h> #include <openssl/dh.h> #include <openssl/ec.h> #include <openssl/ec_key.h> @@ -76,6 +77,7 @@ using ScopedBIO = ScopedOpenSSLType<BIO, BIO_vfree>; using ScopedBIGNUM = ScopedOpenSSLType<BIGNUM, BN_free>; using ScopedBN_CTX = ScopedOpenSSLType<BN_CTX, BN_CTX_free>; using ScopedBN_MONT_CTX = ScopedOpenSSLType<BN_MONT_CTX, BN_MONT_CTX_free>; +using ScopedCMAC_CTX = ScopedOpenSSLType<CMAC_CTX, CMAC_CTX_free>; using ScopedDH = ScopedOpenSSLType<DH, DH_free>; using ScopedECDSA_SIG = ScopedOpenSSLType<ECDSA_SIG, ECDSA_SIG_free>; using ScopedEC_GROUP = ScopedOpenSSLType<EC_GROUP, EC_GROUP_free>; |