summaryrefslogtreecommitdiffstats
path: root/crypto/dsa/dsa_sign.c
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2020-02-16 13:03:46 +1000
committerShane Lontis <shane.lontis@oracle.com>2020-02-16 13:03:46 +1000
commit8083fd3a183d4c881d6b15727cbc6cb7faeb3280 (patch)
tree82e998aa30cc9dc610b4f262df1f7ef73b23edad /crypto/dsa/dsa_sign.c
parent98ad3fe82bd3e7e7f929dd1fa4ef3915426002c0 (diff)
Add FFC param/key validation
Embed libctx in dsa and dh objects and cleanup internal methods to not pass libctx (This makes it consistent with the rsa changes) Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10910)
Diffstat (limited to 'crypto/dsa/dsa_sign.c')
-rw-r--r--crypto/dsa/dsa_sign.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/dsa/dsa_sign.c b/crypto/dsa/dsa_sign.c
index 1ee9272ced..9ef8f30f1e 100644
--- a/crypto/dsa/dsa_sign.c
+++ b/crypto/dsa/dsa_sign.c
@@ -148,16 +148,16 @@ int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s)
return 1;
}
-int dsa_sign_int(OPENSSL_CTX *libctx, int type, const unsigned char *dgst,
+int dsa_sign_int(int type, const unsigned char *dgst,
int dlen, unsigned char *sig, unsigned int *siglen, DSA *dsa)
{
DSA_SIG *s;
/* legacy case uses the method table */
- if (libctx == NULL || dsa->meth != DSA_get_default_method())
+ if (dsa->libctx == NULL || dsa->meth != DSA_get_default_method())
s = DSA_do_sign(dgst, dlen, dsa);
else
- s = dsa_do_sign_int(libctx, dgst, dlen, dsa);
+ s = dsa_do_sign_int(dgst, dlen, dsa);
if (s == NULL) {
*siglen = 0;
return 0;
@@ -170,7 +170,7 @@ int dsa_sign_int(OPENSSL_CTX *libctx, int type, const unsigned char *dgst,
int DSA_sign(int type, const unsigned char *dgst, int dlen,
unsigned char *sig, unsigned int *siglen, DSA *dsa)
{
- return dsa_sign_int(NULL, type, dgst, dlen, sig, siglen, dsa);
+ return dsa_sign_int(type, dgst, dlen, sig, siglen, dsa);
}
/* data has already been hashed (probably with SHA or SHA-1). */