summaryrefslogtreecommitdiffstats
path: root/crypto/dsa/dsa_pmeth.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2016-02-14 04:33:56 +0100
committerRich Salz <rsalz@openssl.org>2016-02-22 19:39:44 +0100
commita773b52a61bb269e75ebbac01cfca9ebcb6c78b9 (patch)
treeb70a39274abcb667620e2bb8f99570cad672ea65 /crypto/dsa/dsa_pmeth.c
parentUse $disabled{shared} in a safer manner (diff)
downloadopenssl-a773b52a61bb269e75ebbac01cfca9ebcb6c78b9.tar.xz
openssl-a773b52a61bb269e75ebbac01cfca9ebcb6c78b9.zip
Remove unused parameters from internal functions
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/dsa/dsa_pmeth.c')
-rw-r--r--crypto/dsa/dsa_pmeth.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/crypto/dsa/dsa_pmeth.c b/crypto/dsa/dsa_pmeth.c
index 1110e01b39..8eca37fd0a 100644
--- a/crypto/dsa/dsa_pmeth.c
+++ b/crypto/dsa/dsa_pmeth.c
@@ -120,7 +120,7 @@ static int pkey_dsa_sign(EVP_PKEY_CTX *ctx, unsigned char *sig,
size_t *siglen, const unsigned char *tbs,
size_t tbslen)
{
- int ret, type;
+ int ret;
unsigned int sltmp;
DSA_PKEY_CTX *dctx = ctx->data;
DSA *dsa = ctx->pkey->pkey.dsa;
@@ -128,14 +128,12 @@ static int pkey_dsa_sign(EVP_PKEY_CTX *ctx, unsigned char *sig,
if (dctx->md) {
if (tbslen != (size_t)EVP_MD_size(dctx->md))
return 0;
- type = EVP_MD_type(dctx->md);
} else {
if (tbslen != SHA_DIGEST_LENGTH)
return 0;
- type = NID_sha1;
}
- ret = DSA_sign(type, tbs, tbslen, sig, &sltmp, dsa);
+ ret = DSA_sign(0, tbs, tbslen, sig, &sltmp, dsa);
if (ret <= 0)
return ret;
@@ -147,21 +145,19 @@ static int pkey_dsa_verify(EVP_PKEY_CTX *ctx,
const unsigned char *sig, size_t siglen,
const unsigned char *tbs, size_t tbslen)
{
- int ret, type;
+ int ret;
DSA_PKEY_CTX *dctx = ctx->data;
DSA *dsa = ctx->pkey->pkey.dsa;
if (dctx->md) {
if (tbslen != (size_t)EVP_MD_size(dctx->md))
return 0;
- type = EVP_MD_type(dctx->md);
} else {
if (tbslen != SHA_DIGEST_LENGTH)
return 0;
- type = NID_sha1;
}
- ret = DSA_verify(type, tbs, tbslen, sig, siglen, dsa);
+ ret = DSA_verify(0, tbs, tbslen, sig, siglen, dsa);
return ret;
}