summaryrefslogtreecommitdiff
path: root/apps/x509.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2005-08-20 18:12:45 +0000
committerDr. Stephen Henson <steve@openssl.org>2005-08-20 18:12:45 +0000
commit45e2738585bd735e5b50d53e67bc6596eb7d5143 (patch)
treeb4e11b64c14f6a9df1a53e29f505e27f223d83bf /apps/x509.c
parentb173acfc9649401d2852ce0ca6581470d0407b47 (diff)
downloadopenssl-new-45e2738585bd735e5b50d53e67bc6596eb7d5143.tar.gz
Remove ASN1_METHOD code replace with new ASN1 alternative.
Diffstat (limited to 'apps/x509.c')
-rw-r--r--apps/x509.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/apps/x509.c b/apps/x509.c
index 5f61eb5c46..8d20681ec3 100644
--- a/apps/x509.c
+++ b/apps/x509.c
@@ -1033,16 +1033,15 @@ bad:
}
else if (outformat == FORMAT_NETSCAPE)
{
- ASN1_HEADER ah;
- ASN1_OCTET_STRING os;
+ NETSCAPE_X509 nx;
+ ASN1_OCTET_STRING hdr;
- os.data=(unsigned char *)NETSCAPE_CERT_HDR;
- os.length=strlen(NETSCAPE_CERT_HDR);
- ah.header= &os;
- ah.data=(char *)x;
- ah.meth=X509_asn1_meth();
+ hdr.data=(unsigned char *)NETSCAPE_CERT_HDR;
+ hdr.length=strlen(NETSCAPE_CERT_HDR);
+ nx.header= &hdr;
+ nx.cert=x;
- i=ASN1_i2d_bio_of(ASN1_HEADER,i2d_ASN1_HEADER,out,&ah);
+ i=ASN1_item_i2d_bio(ASN1_ITEM_rptr(NETSCAPE_X509),out,&nx);
}
else {
BIO_printf(bio_err,"bad output format specified for outfile\n");