From 8ec3fa0597224abf3bdcb59da0f02f3100f75459 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Mon, 4 Oct 2010 13:58:41 +0000 Subject: fix signature printing routines --- crypto/dsa/dsa_ameth.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'crypto/dsa') diff --git a/crypto/dsa/dsa_ameth.c b/crypto/dsa/dsa_ameth.c index b38e1a4ee9..376156ec5e 100644 --- a/crypto/dsa/dsa_ameth.c +++ b/crypto/dsa/dsa_ameth.c @@ -547,7 +547,15 @@ static int dsa_sig_print(BIO *bp, const X509_ALGOR *sigalg, int indent, ASN1_PCTX *pctx) { DSA_SIG *dsa_sig; - const unsigned char *p = sig->data; + const unsigned char *p; + if (!sig) + { + if (BIO_puts(bp, "\n") <= 0) + return 0; + else + return 1; + } + p = sig->data; dsa_sig = d2i_DSA_SIG(NULL, &p, sig->length); if (dsa_sig) { -- cgit v1.2.3