diff --git a/ext/openssl/ossl_pkey_dh.c b/ext/openssl/ossl_pkey_dh.c index 3f2975c5a..558bc56bf 100644 --- a/ext/openssl/ossl_pkey_dh.c +++ b/ext/openssl/ossl_pkey_dh.c @@ -141,7 +141,8 @@ static VALUE ossl_dh_initialize_copy(VALUE self, VALUE other) { EVP_PKEY *pkey; - DH *dh, *dh_other; + DH *dh; + OSSL_3_const DH *dh_other; const BIGNUM *pub, *priv; TypedData_Get_Struct(self, EVP_PKEY, &ossl_evp_pkey_type, pkey); @@ -318,7 +319,7 @@ ossl_dh_check_params(VALUE self) ret = EVP_PKEY_param_check(pctx); EVP_PKEY_CTX_free(pctx); #else - DH *dh; + OSSL_3_const DH *dh; int codes; GetDH(self, dh); diff --git a/ext/openssl/ossl_pkey_dsa.c b/ext/openssl/ossl_pkey_dsa.c index 041646a05..0ef1c43f4 100644 --- a/ext/openssl/ossl_pkey_dsa.c +++ b/ext/openssl/ossl_pkey_dsa.c @@ -152,7 +152,8 @@ static VALUE ossl_dsa_initialize_copy(VALUE self, VALUE other) { EVP_PKEY *pkey; - DSA *dsa, *dsa_new; + OSSL_3_const DSA *dsa; + DSA *dsa_new; TypedData_Get_Struct(self, EVP_PKEY, &ossl_evp_pkey_type, pkey); if (pkey) diff --git a/ext/openssl/ossl_pkey_ec.c b/ext/openssl/ossl_pkey_ec.c index 35f031819..bd9647677 100644 --- a/ext/openssl/ossl_pkey_ec.c +++ b/ext/openssl/ossl_pkey_ec.c @@ -199,7 +199,8 @@ static VALUE ossl_ec_key_initialize_copy(VALUE self, VALUE other) { EVP_PKEY *pkey; - EC_KEY *ec, *ec_new; + OSSL_3_const EC_KEY *ec; + EC_KEY *ec_new; TypedData_Get_Struct(self, EVP_PKEY, &ossl_evp_pkey_type, pkey); if (pkey) @@ -566,7 +567,7 @@ static VALUE ossl_ec_key_check_key(VALUE self) EVP_PKEY_CTX_free(pctx); #else - EC_KEY *ec; + OSSL_3_const EC_KEY *ec; GetEC(self, ec); if (EC_KEY_check_key(ec) != 1) diff --git a/ext/openssl/ossl_pkey_rsa.c b/ext/openssl/ossl_pkey_rsa.c index 039b2c6a3..7af0e2209 100644 --- a/ext/openssl/ossl_pkey_rsa.c +++ b/ext/openssl/ossl_pkey_rsa.c @@ -148,7 +148,8 @@ static VALUE ossl_rsa_initialize_copy(VALUE self, VALUE other) { EVP_PKEY *pkey; - RSA *rsa, *rsa_new; + OSSL_3_const RSA *rsa; + RSA *rsa_new; TypedData_Get_Struct(self, EVP_PKEY, &ossl_evp_pkey_type, pkey); if (pkey)