diff options
author | Richard Levitte <levitte@openssl.org> | 2001-06-05 05:08:26 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2001-06-05 05:08:26 +0000 |
commit | 4ae5099856741dd7cf365dbd2c1df45751dfbf4f (patch) | |
tree | c218683fb5358552e9e1f9ca7a38f4a0045f3914 /crypto/dsa/dsa_ossl.c | |
parent | 5c36f01000e38d11465259f81fc3c052d00d52e8 (diff) | |
download | openssl-4ae5099856741dd7cf365dbd2c1df45751dfbf4f.tar.gz |
Add changes from the 0.9.6-stable branch.
Diffstat (limited to 'crypto/dsa/dsa_ossl.c')
-rw-r--r-- | crypto/dsa/dsa_ossl.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crypto/dsa/dsa_ossl.c b/crypto/dsa/dsa_ossl.c index 72878e193f..0ee172dd07 100644 --- a/crypto/dsa/dsa_ossl.c +++ b/crypto/dsa/dsa_ossl.c @@ -106,6 +106,11 @@ static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) int i,reason=ERR_R_BN_LIB; DSA_SIG *ret=NULL; + if (!dsa->p || !dsa->q || !dsa->g) + { + reason=DSA_R_MISSING_PARAMETERS; + goto err; + } BN_init(&m); BN_init(&xr); s=BN_new(); @@ -168,6 +173,11 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp) BIGNUM k,*kinv=NULL,*r=NULL; int ret=0; + if (!dsa->p || !dsa->q || !dsa->g) + { + DSAerr(DSA_F_DSA_SIGN_SETUP,DSA_R_MISSING_PARAMETERS); + return 0; + } if (ctx_in == NULL) { if ((ctx=BN_CTX_new()) == NULL) goto err; |