[openssl] master update
Matt Caswell
matt at openssl.org
Tue Jul 27 09:52:03 UTC 2021
The branch master has been updated
via c6fcd88fa030da8322cf27aff95376512f41faff (commit)
from 26411bc8879bf979e3703357e9595de057528e28 (commit)
- Log -----------------------------------------------------------------
commit c6fcd88fa030da8322cf27aff95376512f41faff
Author: Matt Caswell <matt at openssl.org>
Date: Tue Jul 20 16:18:04 2021 +0100
Mark the EVP_PKEY_METHOD arg as const on some EVP_PKEY_meth_get_*() funcs
Most EVP_PKEY_meth_get_*() functions mark the EVP_PKEY_METHOD argument as
const. But 3 did not. We fix those to be consistent.
Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16128)
-----------------------------------------------------------------------
Summary of changes:
crypto/evp/pmeth_lib.c | 6 +++---
doc/man3/EVP_PKEY_meth_new.pod | 6 +++---
include/openssl/evp.h | 6 +++---
test/evp_extra_test.c | 2 +-
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/crypto/evp/pmeth_lib.c b/crypto/evp/pmeth_lib.c
index 7b835a5eb6..954166caae 100644
--- a/crypto/evp/pmeth_lib.c
+++ b/crypto/evp/pmeth_lib.c
@@ -1990,7 +1990,7 @@ void EVP_PKEY_meth_get_ctrl(const EVP_PKEY_METHOD *pmeth,
*pctrl_str = pmeth->ctrl_str;
}
-void EVP_PKEY_meth_get_digestsign(EVP_PKEY_METHOD *pmeth,
+void EVP_PKEY_meth_get_digestsign(const EVP_PKEY_METHOD *pmeth,
int (**digestsign) (EVP_MD_CTX *ctx, unsigned char *sig, size_t *siglen,
const unsigned char *tbs, size_t tbslen))
{
@@ -1998,7 +1998,7 @@ void EVP_PKEY_meth_get_digestsign(EVP_PKEY_METHOD *pmeth,
*digestsign = pmeth->digestsign;
}
-void EVP_PKEY_meth_get_digestverify(EVP_PKEY_METHOD *pmeth,
+void EVP_PKEY_meth_get_digestverify(const EVP_PKEY_METHOD *pmeth,
int (**digestverify) (EVP_MD_CTX *ctx, const unsigned char *sig,
size_t siglen, const unsigned char *tbs,
size_t tbslen))
@@ -2028,7 +2028,7 @@ void EVP_PKEY_meth_get_param_check(const EVP_PKEY_METHOD *pmeth,
*pcheck = pmeth->param_check;
}
-void EVP_PKEY_meth_get_digest_custom(EVP_PKEY_METHOD *pmeth,
+void EVP_PKEY_meth_get_digest_custom(const EVP_PKEY_METHOD *pmeth,
int (**pdigest_custom) (EVP_PKEY_CTX *ctx,
EVP_MD_CTX *mctx))
{
diff --git a/doc/man3/EVP_PKEY_meth_new.pod b/doc/man3/EVP_PKEY_meth_new.pod
index d07ec1a637..06404079ab 100644
--- a/doc/man3/EVP_PKEY_meth_new.pod
+++ b/doc/man3/EVP_PKEY_meth_new.pod
@@ -220,13 +220,13 @@ L<openssl_user_macros(7)>:
int (**pctrl_str) (EVP_PKEY_CTX *ctx,
const char *type,
const char *value));
- void EVP_PKEY_meth_get_digestsign(EVP_PKEY_METHOD *pmeth,
+ void EVP_PKEY_meth_get_digestsign(const EVP_PKEY_METHOD *pmeth,
int (**digestsign) (EVP_MD_CTX *ctx,
unsigned char *sig,
size_t *siglen,
const unsigned char *tbs,
size_t tbslen));
- void EVP_PKEY_meth_get_digestverify(EVP_PKEY_METHOD *pmeth,
+ void EVP_PKEY_meth_get_digestverify(const EVP_PKEY_METHOD *pmeth,
int (**digestverify) (EVP_MD_CTX *ctx,
const unsigned char *sig,
size_t siglen,
@@ -238,7 +238,7 @@ L<openssl_user_macros(7)>:
int (**pcheck) (EVP_PKEY *pkey));
void EVP_PKEY_meth_get_param_check(const EVP_PKEY_METHOD *pmeth,
int (**pcheck) (EVP_PKEY *pkey));
- void EVP_PKEY_meth_get_digest_custom(EVP_PKEY_METHOD *pmeth,
+ void EVP_PKEY_meth_get_digest_custom(const EVP_PKEY_METHOD *pmeth,
int (**pdigest_custom) (EVP_PKEY_CTX *ctx,
EVP_MD_CTX *mctx));
diff --git a/include/openssl/evp.h b/include/openssl/evp.h
index 1c8ce48773..1850381720 100644
--- a/include/openssl/evp.h
+++ b/include/openssl/evp.h
@@ -2117,11 +2117,11 @@ OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_ctrl
int (**pctrl_str) (EVP_PKEY_CTX *ctx, const char *type,
const char *value));
OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_digestsign
- (EVP_PKEY_METHOD *pmeth,
+ (const EVP_PKEY_METHOD *pmeth,
int (**digestsign) (EVP_MD_CTX *ctx, unsigned char *sig, size_t *siglen,
const unsigned char *tbs, size_t tbslen));
OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_digestverify
- (EVP_PKEY_METHOD *pmeth,
+ (const EVP_PKEY_METHOD *pmeth,
int (**digestverify) (EVP_MD_CTX *ctx, const unsigned char *sig,
size_t siglen, const unsigned char *tbs,
size_t tbslen));
@@ -2132,7 +2132,7 @@ OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_public_check
OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_param_check
(const EVP_PKEY_METHOD *pmeth, int (**pcheck) (EVP_PKEY *pkey));
OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_digest_custom
- (EVP_PKEY_METHOD *pmeth,
+ (const EVP_PKEY_METHOD *pmeth,
int (**pdigest_custom) (EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx));
# endif
diff --git a/test/evp_extra_test.c b/test/evp_extra_test.c
index 5358a54a6d..7494c1f21b 100644
--- a/test/evp_extra_test.c
+++ b/test/evp_extra_test.c
@@ -3478,7 +3478,7 @@ static int custom_pmeth_digestsign(EVP_MD_CTX *ctx, unsigned char *sig,
int (*pdigestsign)(EVP_MD_CTX *ctx, unsigned char *sig, size_t *siglen,
const unsigned char *tbs, size_t tbslen);
- EVP_PKEY_meth_get_digestsign((EVP_PKEY_METHOD *)orig_pmeth, &pdigestsign);
+ EVP_PKEY_meth_get_digestsign(orig_pmeth, &pdigestsign);
return pdigestsign(ctx, sig, siglen, tbs, tbslen);
}
More information about the openssl-commits
mailing list