Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1193)
int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s)
{
+ if (r == NULL || s == NULL)
+ return 0;
BN_clear_free(sig->r);
BN_clear_free(sig->s);
sig->r = r;
int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s)
{
+ if (r == NULL || s == NULL)
+ return 0;
BN_clear_free(sig->r);
BN_clear_free(sig->s);
sig->r = r;