diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2010-10-04 13:58:41 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2010-10-04 13:58:41 +0000 |
commit | 8ec3fa0597224abf3bdcb59da0f02f3100f75459 (patch) | |
tree | 5136049b4ff62e92c10aabc7d0545fcf14cb342c /crypto/dsa | |
parent | 0c7246ed4bec060aa6c0b834e5ca0c02739254b5 (diff) | |
download | openssl-8ec3fa0597224abf3bdcb59da0f02f3100f75459.tar.gz |
fix signature printing routines
Diffstat (limited to 'crypto/dsa')
-rw-r--r-- | crypto/dsa/dsa_ameth.c | 10 |
1 files changed, 9 insertions, 1 deletions
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) { |