aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/asn1
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>1999-03-27 14:06:25 +0000
committerDr. Stephen Henson <steve@openssl.org>1999-03-27 14:06:25 +0000
commit785cdf20482063a6b59c44825e33c1dee60217d2 (patch)
tree58f0d2c932ca955c34677b8cf61792748d2c0c53 /crypto/asn1
parentba423addddbc43be1e3bddca727332a9bfe3cb46 (diff)
downloadopenssl-785cdf20482063a6b59c44825e33c1dee60217d2.tar.gz
Add initial support for Thawte strong extranet certificate extensions and
include an 'indent' option to V3 stuff.
Diffstat (limited to 'crypto/asn1')
-rw-r--r--crypto/asn1/asn1.err4
-rw-r--r--crypto/asn1/asn1.h4
-rw-r--r--crypto/asn1/asn1_err.c4
-rw-r--r--crypto/asn1/t_crl.c8
-rw-r--r--crypto/asn1/t_x509.c37
5 files changed, 20 insertions, 37 deletions
diff --git a/crypto/asn1/asn1.err b/crypto/asn1/asn1.err
index 92acb0a06e..3146d470bd 100644
--- a/crypto/asn1/asn1.err
+++ b/crypto/asn1/asn1.err
@@ -75,6 +75,8 @@
#define ASN1_F_D2I_PUBLICKEY 156
#define ASN1_F_D2I_RSAPRIVATEKEY 157
#define ASN1_F_D2I_RSAPUBLICKEY 158
+#define ASN1_F_D2I_SXNET 241
+#define ASN1_F_D2I_SXNETID 243
#define ASN1_F_D2I_X509 159
#define ASN1_F_D2I_X509_ALGOR 160
#define ASN1_F_D2I_X509_ATTRIBUTE 161
@@ -122,6 +124,8 @@
#define ASN1_F_PKCS7_SIGNER_INFO_NEW 200
#define ASN1_F_PKCS7_SIGN_ENVELOPE_NEW 201
#define ASN1_F_PKEY_USAGE_PERIOD_NEW 240
+#define ASN1_F_SXNETID_NEW 244
+#define ASN1_F_SXNET_NEW 242
#define ASN1_F_X509_ALGOR_NEW 202
#define ASN1_F_X509_ATTRIBUTE_NEW 203
#define ASN1_F_X509_CINF_NEW 204
diff --git a/crypto/asn1/asn1.h b/crypto/asn1/asn1.h
index d2f81e524f..7e605c83d6 100644
--- a/crypto/asn1/asn1.h
+++ b/crypto/asn1/asn1.h
@@ -768,6 +768,8 @@ ASN1_BMPSTRING *d2i_ASN1_BMPSTRING();
#define ASN1_F_D2I_PUBLICKEY 156
#define ASN1_F_D2I_RSAPRIVATEKEY 157
#define ASN1_F_D2I_RSAPUBLICKEY 158
+#define ASN1_F_D2I_SXNET 241
+#define ASN1_F_D2I_SXNETID 243
#define ASN1_F_D2I_X509 159
#define ASN1_F_D2I_X509_ALGOR 160
#define ASN1_F_D2I_X509_ATTRIBUTE 161
@@ -815,6 +817,8 @@ ASN1_BMPSTRING *d2i_ASN1_BMPSTRING();
#define ASN1_F_PKCS7_SIGNER_INFO_NEW 200
#define ASN1_F_PKCS7_SIGN_ENVELOPE_NEW 201
#define ASN1_F_PKEY_USAGE_PERIOD_NEW 240
+#define ASN1_F_SXNETID_NEW 244
+#define ASN1_F_SXNET_NEW 242
#define ASN1_F_X509_ALGOR_NEW 202
#define ASN1_F_X509_ATTRIBUTE_NEW 203
#define ASN1_F_X509_CINF_NEW 204
diff --git a/crypto/asn1/asn1_err.c b/crypto/asn1/asn1_err.c
index aead3126cc..900358249a 100644
--- a/crypto/asn1/asn1_err.c
+++ b/crypto/asn1/asn1_err.c
@@ -137,6 +137,8 @@ static ERR_STRING_DATA ASN1_str_functs[]=
{ERR_PACK(0,ASN1_F_D2I_PUBLICKEY,0), "D2I_PUBLICKEY"},
{ERR_PACK(0,ASN1_F_D2I_RSAPRIVATEKEY,0), "D2I_RSAPRIVATEKEY"},
{ERR_PACK(0,ASN1_F_D2I_RSAPUBLICKEY,0), "D2I_RSAPUBLICKEY"},
+{ERR_PACK(0,ASN1_F_D2I_SXNET,0), "D2I_SXNET"},
+{ERR_PACK(0,ASN1_F_D2I_SXNETID,0), "D2I_SXNETID"},
{ERR_PACK(0,ASN1_F_D2I_X509,0), "D2I_X509"},
{ERR_PACK(0,ASN1_F_D2I_X509_ALGOR,0), "D2I_X509_ALGOR"},
{ERR_PACK(0,ASN1_F_D2I_X509_ATTRIBUTE,0), "D2I_X509_ATTRIBUTE"},
@@ -184,6 +186,8 @@ static ERR_STRING_DATA ASN1_str_functs[]=
{ERR_PACK(0,ASN1_F_PKCS7_SIGNER_INFO_NEW,0), "PKCS7_SIGNER_INFO_NEW"},
{ERR_PACK(0,ASN1_F_PKCS7_SIGN_ENVELOPE_NEW,0), "PKCS7_SIGN_ENVELOPE_NEW"},
{ERR_PACK(0,ASN1_F_PKEY_USAGE_PERIOD_NEW,0), "PKEY_USAGE_PERIOD_NEW"},
+{ERR_PACK(0,ASN1_F_SXNETID_NEW,0), "SXNETID_NEW"},
+{ERR_PACK(0,ASN1_F_SXNET_NEW,0), "SXNET_NEW"},
{ERR_PACK(0,ASN1_F_X509_ALGOR_NEW,0), "X509_ALGOR_NEW"},
{ERR_PACK(0,ASN1_F_X509_ATTRIBUTE_NEW,0), "X509_ATTRIBUTE_NEW"},
{ERR_PACK(0,ASN1_F_X509_CINF_NEW,0), "X509_CINF_NEW"},
diff --git a/crypto/asn1/t_crl.c b/crypto/asn1/t_crl.c
index d36b0c23af..eb0ab2e323 100644
--- a/crypto/asn1/t_crl.c
+++ b/crypto/asn1/t_crl.c
@@ -167,8 +167,10 @@ X509_EXTENSION *ex;
obj=X509_EXTENSION_get_object(ex);
i2a_ASN1_OBJECT(out,obj);
j=X509_EXTENSION_get_critical(ex);
- BIO_printf(out, ": %s\n%16s", j ? "critical":"","");
- if(!X509V3_EXT_print(out, ex, 0))
- ASN1_OCTET_STRING_print(out,ex->value);
+ BIO_printf(out, ": %s\n", j ? "critical":"","");
+ if(!X509V3_EXT_print(out, ex, 0, 16)) {
+ BIO_printf(out, "%16s", "");
+ ASN1_OCTET_STRING_print(out,ex->value);
+ }
BIO_write(out,"\n",1);
}
diff --git a/crypto/asn1/t_x509.c b/crypto/asn1/t_x509.c
index f0534efc09..12e170488f 100644
--- a/crypto/asn1/t_x509.c
+++ b/crypto/asn1/t_x509.c
@@ -201,42 +201,11 @@ X509 *x;
obj=X509_EXTENSION_get_object(ex);
i2a_ASN1_OBJECT(bp,obj);
j=X509_EXTENSION_get_critical(ex);
- if (BIO_printf(bp,": %s\n%16s",j?"critical":"","") <= 0)
+ if (BIO_printf(bp,": %s\n",j?"critical":"","") <= 0)
goto err;
-#if 0
- pack_type=X509v3_pack_type_by_OBJ(obj);
- data_type=X509v3_data_type_by_OBJ(obj);
-
- if (pack_type == X509_EXT_PACK_STRING)
- {
- if (X509v3_unpack_string(
- &str,data_type,
- X509_EXTENSION_get_data(ex)) == NULL)
- {
- /* hmm... */
- goto err;
- }
- if ( (data_type == V_ASN1_IA5STRING) ||
- (data_type == V_ASN1_PRINTABLESTRING) ||
- (data_type == V_ASN1_T61STRING))
- {
- if (BIO_write(bp,(char *)str->data,
- str->length) <= 0)
- goto err;
- }
- else if (data_type == V_ASN1_BIT_STRING)
- {
- BIO_printf(bp,"0x");
- for (j=0; j<str->length; j++)
- {
- BIO_printf(bp,"%02X",
- str->data[j]);
- }
- }
- }
-#endif
- if(!X509V3_EXT_print(bp, ex, 0))
+ if(!X509V3_EXT_print(bp, ex, 0, 16))
{
+ BIO_printf(bp, "%16s", "");
ASN1_OCTET_STRING_print(bp,ex->value);
}
if (BIO_write(bp,"\n",1) <= 0) goto err;