The branch master has been updated via ffb6c86663f8d1048b8bac4023c0e41d3ec5891d (commit) via 5ea8afd368498101531c7e628507a17d1e0e122c (commit) from 7f81aed4bccbeb0ad491b68dd601d576c4956c78 (commit)
- Log ----------------------------------------------------------------- commit ffb6c86663f8d1048b8bac4023c0e41d3ec5891d Author: Pauli <paul.d...@oracle.com> Date: Fri Jun 12 08:48:06 2020 +1000 Guard new header mac.h against C++isms. [extended tests] Reviewed-by: Dmitry Belyavskiy <beld...@gmail.com> (Merged from https://github.com/openssl/openssl/pull/12121) commit 5ea8afd368498101531c7e628507a17d1e0e122c Author: Pauli <paul.d...@oracle.com> Date: Fri Jun 12 07:49:18 2020 +1000 Fix two additional instances of the old EVP_MAC_CTX_ functions being used. [extended tests] Reviewed-by: Dmitry Belyavskiy <beld...@gmail.com> (Merged from https://github.com/openssl/openssl/pull/12121) ----------------------------------------------------------------------- Summary of changes: crypto/evp/pkey_mac.c | 2 +- include/openssl/mac.h | 7 +++++++ test/ossl_shim/ossl_shim.cc | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/crypto/evp/pkey_mac.c b/crypto/evp/pkey_mac.c index 1901c452e7..55badea7e9 100644 --- a/crypto/evp/pkey_mac.c +++ b/crypto/evp/pkey_mac.c @@ -400,7 +400,7 @@ static int pkey_mac_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) return 0; /* - * Since EVP_MAC_CTX_{get,set}_params() returned successfully, + * Since EVP_MAC_{get,set}_ctx_params() returned successfully, * we can only assume that the size was ignored, i.e. this * control is unsupported. */ diff --git a/include/openssl/mac.h b/include/openssl/mac.h index 4fb808525f..ecfb2eca27 100644 --- a/include/openssl/mac.h +++ b/include/openssl/mac.h @@ -17,6 +17,10 @@ # include <openssl/types.h> # include <openssl/core.h> +# ifdef __cplusplus +extern "C" { +# endif + EVP_MAC *EVP_MAC_fetch(OPENSSL_CTX *libctx, const char *algorithm, const char *properties); int EVP_MAC_up_ref(EVP_MAC *mac); @@ -49,4 +53,7 @@ void EVP_MAC_names_do_all(const EVP_MAC *mac, void (*fn)(const char *name, void *data), void *data); +# ifdef __cplusplus +} +# endif #endif /* OPENSSL_EVP_MAC_H */ diff --git a/test/ossl_shim/ossl_shim.cc b/test/ossl_shim/ossl_shim.cc index 720a92d9d6..0184778d4f 100644 --- a/test/ossl_shim/ossl_shim.cc +++ b/test/ossl_shim/ossl_shim.cc @@ -403,7 +403,7 @@ static int TicketKeyCallback(SSL *ssl, uint8_t *key_name, uint8_t *iv, if (!EVP_CipherInit_ex(ctx, EVP_aes_128_cbc(), NULL, kZeros, iv, encrypt) || !EVP_MAC_init(hmac_ctx) - || !EVP_MAC_CTX_set_params(hmac_ctx, params)) { + || !EVP_MAC_set_ctx_params(hmac_ctx, params)) { return -1; }