diff options
author | Matt Braithwaite <mab@google.com> | 2016-08-18 06:10:28 +0300 |
---|---|---|
committer | CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> | 2016-09-02 01:22:54 +0300 |
commit | d17d74d73f8a008f5e7ca6a64257b3c3a99d1bb4 (patch) | |
tree | 77f0a84c6ddac2344a2bbcc9daff73f7233ddc1c /include/openssl/cmac.h | |
parent | bc61769e49df6c84de636051ecd8b8104c07caf4 (diff) |
Replace Scoped* heap types with bssl::UniquePtr.
Unlike the Scoped* types, bssl::UniquePtr is available to C++ users, and
offered for a large variety of types. The 'extern "C++"' trick is used
to make the C++ bits digestible to C callers that wrap header files in
'extern "C"'.
Change-Id: Ifbca4c2997d6628e33028c7d7620c72aff0f862e
Reviewed-on: https://boringssl-review.googlesource.com/10521
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
Diffstat (limited to 'include/openssl/cmac.h')
-rw-r--r-- | include/openssl/cmac.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/openssl/cmac.h b/include/openssl/cmac.h index 0bb44b95..fb0b9f25 100644 --- a/include/openssl/cmac.h +++ b/include/openssl/cmac.h @@ -71,6 +71,21 @@ OPENSSL_EXPORT int CMAC_Final(CMAC_CTX *ctx, uint8_t *out, size_t *out_len); #if defined(__cplusplus) } /* extern C */ + +extern "C++" { + +namespace bssl { + +namespace internal { + +BORINGSSL_MAKE_DELETER(CMAC_CTX, CMAC_CTX_free) + +} // namespace internal + +} // namespace bssl + +} /* extern C++ */ + #endif #endif /* OPENSSL_HEADER_CMAC_H */ |