diff options
author | Matt Caswell <matt@openssl.org> | 2021-03-02 15:52:00 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2021-03-08 15:13:09 +0000 |
commit | 7bc0fdd3fd4535e06c35b92d71afab9a6de94cc5 (patch) | |
tree | 2e57cd75e2b81a4ae2bc8d375096e094f8b5b0e5 /crypto/evp/ctrl_params_translate.c | |
parent | cc57dc962516410f6269023c8a93913617414b5e (diff) |
Make the EVP_PKEY_get0* functions have a const return type
OTC have decided that the EVP_PKEY_get0* functions should have a const
return type. This is a breaking change to emphasise that these values
should be considered as immutable.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14319)
Diffstat (limited to 'crypto/evp/ctrl_params_translate.c')
-rw-r--r-- | crypto/evp/ctrl_params_translate.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/evp/ctrl_params_translate.c b/crypto/evp/ctrl_params_translate.c index ae3340395d..966278171c 100644 --- a/crypto/evp/ctrl_params_translate.c +++ b/crypto/evp/ctrl_params_translate.c @@ -1481,7 +1481,7 @@ static int get_payload_group_name(enum state state, #ifndef OPENSSL_NO_DH case EVP_PKEY_DH: { - DH *dh = EVP_PKEY_get0_DH(pkey); + const DH *dh = EVP_PKEY_get0_DH(pkey); int uid = DH_get_nid(dh); if (uid != NID_undef) { @@ -1531,7 +1531,7 @@ static int get_payload_private_key(enum state state, #ifndef OPENSSL_NO_DH case EVP_PKEY_DH: { - DH *dh = EVP_PKEY_get0_DH(pkey); + const DH *dh = EVP_PKEY_get0_DH(pkey); ctx->p2 = (BIGNUM *)DH_get0_priv_key(dh); } @@ -1540,7 +1540,7 @@ static int get_payload_private_key(enum state state, #ifndef OPENSSL_NO_EC case EVP_PKEY_EC: { - EC_KEY *ec = EVP_PKEY_get0_EC_KEY(pkey); + const EC_KEY *ec = EVP_PKEY_get0_EC_KEY(pkey); ctx->p2 = (BIGNUM *)EC_KEY_get0_private_key(ec); } @@ -1590,7 +1590,7 @@ static int get_payload_public_key(enum state state, #ifndef OPENSSL_NO_EC case EVP_PKEY_EC: if (ctx->params->data_type == OSSL_PARAM_OCTET_STRING) { - EC_KEY *eckey = EVP_PKEY_get0_EC_KEY(pkey); + const EC_KEY *eckey = EVP_PKEY_get0_EC_KEY(pkey); BN_CTX *bnctx = BN_CTX_new_ex(ossl_ec_key_get_libctx(eckey)); const EC_GROUP *ecg = EC_KEY_get0_group(eckey); const EC_POINT *point = EC_KEY_get0_public_key(eckey); |