summaryrefslogtreecommitdiff
path: root/crypto/ec/ec_pmeth.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/ec/ec_pmeth.c')
-rw-r--r--crypto/ec/ec_pmeth.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/crypto/ec/ec_pmeth.c b/crypto/ec/ec_pmeth.c
index e4f3549d30..ce658e14ca 100644
--- a/crypto/ec/ec_pmeth.c
+++ b/crypto/ec/ec_pmeth.c
@@ -126,7 +126,7 @@ static int pkey_ec_sign(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
return 0;
}
- type = (dctx->md != NULL) ? EVP_MD_type(dctx->md) : NID_sha1;
+ type = (dctx->md != NULL) ? EVP_MD_get_type(dctx->md) : NID_sha1;
ret = ECDSA_sign(type, tbs, tbslen, sig, &sltmp, ec);
@@ -145,7 +145,7 @@ static int pkey_ec_verify(EVP_PKEY_CTX *ctx,
EC_KEY *ec = ctx->pkey->pkey.ec;
if (dctx->md)
- type = EVP_MD_type(dctx->md);
+ type = EVP_MD_get_type(dctx->md);
else
type = NID_sha1;
@@ -335,17 +335,17 @@ static int pkey_ec_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
return dctx->kdf_ukmlen;
case EVP_PKEY_CTRL_MD:
- if (EVP_MD_type((const EVP_MD *)p2) != NID_sha1 &&
- EVP_MD_type((const EVP_MD *)p2) != NID_ecdsa_with_SHA1 &&
- EVP_MD_type((const EVP_MD *)p2) != NID_sha224 &&
- EVP_MD_type((const EVP_MD *)p2) != NID_sha256 &&
- EVP_MD_type((const EVP_MD *)p2) != NID_sha384 &&
- EVP_MD_type((const EVP_MD *)p2) != NID_sha512 &&
- EVP_MD_type((const EVP_MD *)p2) != NID_sha3_224 &&
- EVP_MD_type((const EVP_MD *)p2) != NID_sha3_256 &&
- EVP_MD_type((const EVP_MD *)p2) != NID_sha3_384 &&
- EVP_MD_type((const EVP_MD *)p2) != NID_sha3_512 &&
- EVP_MD_type((const EVP_MD *)p2) != NID_sm3) {
+ if (EVP_MD_get_type((const EVP_MD *)p2) != NID_sha1 &&
+ EVP_MD_get_type((const EVP_MD *)p2) != NID_ecdsa_with_SHA1 &&
+ EVP_MD_get_type((const EVP_MD *)p2) != NID_sha224 &&
+ EVP_MD_get_type((const EVP_MD *)p2) != NID_sha256 &&
+ EVP_MD_get_type((const EVP_MD *)p2) != NID_sha384 &&
+ EVP_MD_get_type((const EVP_MD *)p2) != NID_sha512 &&
+ EVP_MD_get_type((const EVP_MD *)p2) != NID_sha3_224 &&
+ EVP_MD_get_type((const EVP_MD *)p2) != NID_sha3_256 &&
+ EVP_MD_get_type((const EVP_MD *)p2) != NID_sha3_384 &&
+ EVP_MD_get_type((const EVP_MD *)p2) != NID_sha3_512 &&
+ EVP_MD_get_type((const EVP_MD *)p2) != NID_sm3) {
ERR_raise(ERR_LIB_EC, EC_R_INVALID_DIGEST_TYPE);
return 0;
}