summaryrefslogtreecommitdiff
path: root/deps/openssl/openssl/crypto/dsa/dsa_asn1.c
diff options
context:
space:
mode:
Diffstat (limited to 'deps/openssl/openssl/crypto/dsa/dsa_asn1.c')
-rw-r--r--deps/openssl/openssl/crypto/dsa/dsa_asn1.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/deps/openssl/openssl/crypto/dsa/dsa_asn1.c b/deps/openssl/openssl/crypto/dsa/dsa_asn1.c
index 551c107506..6499e87ef3 100644
--- a/deps/openssl/openssl/crypto/dsa/dsa_asn1.c
+++ b/deps/openssl/openssl/crypto/dsa/dsa_asn1.c
@@ -75,7 +75,7 @@ static int dsa_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
}
ASN1_SEQUENCE_cb(DSAPrivateKey, dsa_cb) = {
- ASN1_SIMPLE(DSA, version, LONG),
+ ASN1_EMBED(DSA, version, INT32),
ASN1_SIMPLE(DSA, p, BIGNUM),
ASN1_SIMPLE(DSA, q, BIGNUM),
ASN1_SIMPLE(DSA, g, BIGNUM),
@@ -111,15 +111,15 @@ int DSA_sign(int type, const unsigned char *dgst, int dlen,
unsigned char *sig, unsigned int *siglen, DSA *dsa)
{
DSA_SIG *s;
- RAND_seed(dgst, dlen);
+
s = DSA_do_sign(dgst, dlen, dsa);
if (s == NULL) {
*siglen = 0;
- return (0);
+ return 0;
}
*siglen = i2d_DSA_SIG(s, &sig);
DSA_SIG_free(s);
- return (1);
+ return 1;
}
/* data has already been hashed (probably with SHA or SHA-1). */
@@ -140,7 +140,7 @@ int DSA_verify(int type, const unsigned char *dgst, int dgst_len,
s = DSA_SIG_new();
if (s == NULL)
- return (ret);
+ return ret;
if (d2i_DSA_SIG(&s, &p, siglen) == NULL)
goto err;
/* Ensure signature uses DER and doesn't have trailing garbage */
@@ -151,5 +151,5 @@ int DSA_verify(int type, const unsigned char *dgst, int dgst_len,
err:
OPENSSL_clear_free(der, derlen);
DSA_SIG_free(s);
- return (ret);
+ return ret;
}