diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2015-09-18 03:06:55 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2015-09-22 13:07:22 +0100 |
commit | 1f143e08a5cde8e3fa6b5b80988bd6be7673428a (patch) | |
tree | ba29af1a4cae63797a82ea02ba55dd35bc040093 /crypto/asn1/t_req.c | |
parent | 835911b845043817f4477252be4f5fec93165503 (diff) |
New accessor X509_REQ_get_X509_PUBKEY()
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/asn1/t_req.c')
-rw-r--r-- | crypto/asn1/t_req.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/asn1/t_req.c b/crypto/asn1/t_req.c index 8ea350d7a3..1ed404ce62 100644 --- a/crypto/asn1/t_req.c +++ b/crypto/asn1/t_req.c @@ -129,11 +129,15 @@ int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags, goto err; } if (!(cflag & X509_FLAG_NO_PUBKEY)) { + X509_PUBKEY *xpkey; + ASN1_OBJECT *koid; if (BIO_write(bp, " Subject Public Key Info:\n", 33) <= 0) goto err; if (BIO_printf(bp, "%12sPublic Key Algorithm: ", "") <= 0) goto err; - if (i2a_ASN1_OBJECT(bp, ri->pubkey->algor->algorithm) <= 0) + xpkey = X509_REQ_get_X509_PUBKEY(x); + X509_PUBKEY_get0_param(&koid, NULL, NULL, NULL, xpkey); + if (i2a_ASN1_OBJECT(bp, koid) <= 0) goto err; if (BIO_puts(bp, "\n") <= 0) goto err; |