summaryrefslogtreecommitdiffstats
path: root/apps/x509.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2015-08-31 12:58:07 +0100
committerDr. Stephen Henson <steve@openssl.org>2015-08-31 20:58:33 +0100
commit124055a96e8533735b32e6af0fa7913c100ffad2 (patch)
tree1ba18c2a6162f80c8eb8514ffc3f005da879ec8d /apps/x509.c
parentbc3686dfb031445c5af9a256a46a57dc1277a190 (diff)
make X509_REQ opaque
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'apps/x509.c')
-rw-r--r--apps/x509.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/apps/x509.c b/apps/x509.c
index 2fd92f4dcf..6b41a7501a 100644
--- a/apps/x509.c
+++ b/apps/x509.c
@@ -567,15 +567,6 @@ int x509_main(int argc, char **argv)
goto end;
}
- if ((req->req_info == NULL) ||
- (req->req_info->pubkey == NULL) ||
- (req->req_info->pubkey->public_key == NULL) ||
- (req->req_info->pubkey->public_key->data == NULL)) {
- BIO_printf(bio_err,
- "The certificate request appears to corrupted\n");
- BIO_printf(bio_err, "It does not contain a public key\n");
- goto end;
- }
if ((pkey = X509_REQ_get_pubkey(req)) == NULL) {
BIO_printf(bio_err, "error unpacking public key\n");
goto end;
@@ -611,9 +602,9 @@ int x509_main(int argc, char **argv)
} else if (!X509_set_serialNumber(x, sno))
goto end;
- if (!X509_set_issuer_name(x, req->req_info->subject))
+ if (!X509_set_issuer_name(x, X509_REQ_get_subject_name(req)))
goto end;
- if (!X509_set_subject_name(x, req->req_info->subject))
+ if (!X509_set_subject_name(x, X509_REQ_get_subject_name(req)))
goto end;
X509_gmtime_adj(X509_get_notBefore(x), 0);