X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fdsa%2Fdsa_asn1.c;h=86a7ee7b864752b76ba1f7b28a43b97050b459fb;hp=6f9fe3ef673e846ef6a972d135f06ec02dce0300;hb=208fb891e36f16d20262710c70ef0ff3df0e885c;hpb=6a32a3c058dbd9fa7cec5b020e4f027808972e4a diff --git a/crypto/dsa/dsa_asn1.c b/crypto/dsa/dsa_asn1.c index 6f9fe3ef67..86a7ee7b86 100644 --- a/crypto/dsa/dsa_asn1.c +++ b/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, INT32), + ASN1_EMBED(DSA, version, INT32), ASN1_SIMPLE(DSA, p, BIGNUM), ASN1_SIMPLE(DSA, q, BIGNUM), ASN1_SIMPLE(DSA, g, BIGNUM), @@ -111,7 +111,7 @@ 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; @@ -119,7 +119,7 @@ int DSA_sign(int type, const unsigned char *dgst, int dlen, } *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). */