aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/dsa
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2016-01-28 18:41:59 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2016-01-28 18:41:59 +0000
commitc188d4cade9cba451816aef2371942bea4ff837f (patch)
tree7af4d87a03d869e528631ede778e4423dd6a281a /crypto/dsa
parent737d7e8d3945c206c037e139055821aa0c64bb8e (diff)
downloadsrc-c188d4cade9cba451816aef2371942bea4ff837f.tar.gz
src-c188d4cade9cba451816aef2371942bea4ff837f.zip
Import OpenSSL 1.0.2f.vendor/openssl/1.0.2f
Notes
Notes: svn path=/vendor-crypto/openssl/dist/; revision=295001 svn path=/vendor-crypto/openssl/1.0.2f/; revision=295002; tag=vendor/openssl/1.0.2f
Diffstat (limited to 'crypto/dsa')
-rw-r--r--crypto/dsa/dsa_ossl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/dsa/dsa_ossl.c b/crypto/dsa/dsa_ossl.c
index f0ec8faa84cc..efc4f1b6aeba 100644
--- a/crypto/dsa/dsa_ossl.c
+++ b/crypto/dsa/dsa_ossl.c
@@ -187,9 +187,6 @@ static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
if (!BN_mod_mul(s, s, kinv, dsa->q, ctx))
goto err;
- ret = DSA_SIG_new();
- if (ret == NULL)
- goto err;
/*
* Redo if r or s is zero as required by FIPS 186-3: this is very
* unlikely.
@@ -201,11 +198,14 @@ static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
}
goto redo;
}
+ ret = DSA_SIG_new();
+ if (ret == NULL)
+ goto err;
ret->r = r;
ret->s = s;
err:
- if (!ret) {
+ if (ret == NULL) {
DSAerr(DSA_F_DSA_DO_SIGN, reason);
BN_free(r);
BN_free(s);