aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/asn1
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>1999-01-24 17:50:32 +0000
committerDr. Stephen Henson <steve@openssl.org>1999-01-24 17:50:32 +0000
commit834eeef995bb3783550d11186f9d649aaacd43ac (patch)
treebdebcad3737b8a5da6b13f0f4f64b0a084dc382c /crypto/asn1
parent9aeaf1b4a7924cabf829bf57d0ca87d311cd2dfe (diff)
downloadopenssl-834eeef995bb3783550d11186f9d649aaacd43ac.tar.gz
Continuing adding X509 V3 support. This starts to integrate the code with
the main library, but only with printing at present. To see this try: openssl x509 -in cert.pem -text on a certificate with some extensions in it.
Diffstat (limited to 'crypto/asn1')
-rw-r--r--crypto/asn1/asn1.err2
-rw-r--r--crypto/asn1/asn1.h2
-rw-r--r--crypto/asn1/asn1_err.c2
-rw-r--r--crypto/asn1/t_x509.c8
4 files changed, 12 insertions, 2 deletions
diff --git a/crypto/asn1/asn1.err b/crypto/asn1/asn1.err
index aacd076c3b..4bd71a15f3 100644
--- a/crypto/asn1/asn1.err
+++ b/crypto/asn1/asn1.err
@@ -24,6 +24,7 @@
#define ASN1_F_ASN1_TYPE_NEW 119
#define ASN1_F_ASN1_UTCTIME_NEW 120
#define ASN1_F_ASN1_VERIFY 121
+#define ASN1_F_BASIC_CONSTRAINTS_NEW 226
#define ASN1_F_BN_TO_ASN1_INTEGER 122
#define ASN1_F_D2I_ASN1_BIT_STRING 123
#define ASN1_F_D2I_ASN1_BMPSTRING 124
@@ -40,6 +41,7 @@
#define ASN1_F_D2I_ASN1_TYPE 133
#define ASN1_F_D2I_ASN1_TYPE_BYTES 134
#define ASN1_F_D2I_ASN1_UTCTIME 135
+#define ASN1_F_D2I_BASIC_CONSTRAINTS 227
#define ASN1_F_D2I_DHPARAMS 136
#define ASN1_F_D2I_DSAPARAMS 137
#define ASN1_F_D2I_DSAPRIVATEKEY 138
diff --git a/crypto/asn1/asn1.h b/crypto/asn1/asn1.h
index 7d925a6733..c3cd6273f6 100644
--- a/crypto/asn1/asn1.h
+++ b/crypto/asn1/asn1.h
@@ -678,6 +678,7 @@ ASN1_BMPSTRING *d2i_ASN1_BMPSTRING();
#define ASN1_F_ASN1_TYPE_NEW 119
#define ASN1_F_ASN1_UTCTIME_NEW 120
#define ASN1_F_ASN1_VERIFY 121
+#define ASN1_F_BASIC_CONSTRAINTS_NEW 226
#define ASN1_F_BN_TO_ASN1_INTEGER 122
#define ASN1_F_D2I_ASN1_BIT_STRING 123
#define ASN1_F_D2I_ASN1_BMPSTRING 124
@@ -694,6 +695,7 @@ ASN1_BMPSTRING *d2i_ASN1_BMPSTRING();
#define ASN1_F_D2I_ASN1_TYPE 133
#define ASN1_F_D2I_ASN1_TYPE_BYTES 134
#define ASN1_F_D2I_ASN1_UTCTIME 135
+#define ASN1_F_D2I_BASIC_CONSTRAINTS 227
#define ASN1_F_D2I_DHPARAMS 136
#define ASN1_F_D2I_DSAPARAMS 137
#define ASN1_F_D2I_DSAPRIVATEKEY 138
diff --git a/crypto/asn1/asn1_err.c b/crypto/asn1/asn1_err.c
index e36e0ed64d..061ee319b3 100644
--- a/crypto/asn1/asn1_err.c
+++ b/crypto/asn1/asn1_err.c
@@ -86,6 +86,7 @@ static ERR_STRING_DATA ASN1_str_functs[]=
{ERR_PACK(0,ASN1_F_ASN1_TYPE_NEW,0), "ASN1_TYPE_new"},
{ERR_PACK(0,ASN1_F_ASN1_UTCTIME_NEW,0), "ASN1_UTCTIME_NEW"},
{ERR_PACK(0,ASN1_F_ASN1_VERIFY,0), "ASN1_VERIFY"},
+{ERR_PACK(0,ASN1_F_BASIC_CONSTRAINTS_NEW,0), "BASIC_CONSTRAINTS_NEW"},
{ERR_PACK(0,ASN1_F_BN_TO_ASN1_INTEGER,0), "BN_to_ASN1_INTEGER"},
{ERR_PACK(0,ASN1_F_D2I_ASN1_BIT_STRING,0), "d2i_ASN1_BIT_STRING"},
{ERR_PACK(0,ASN1_F_D2I_ASN1_BMPSTRING,0), "d2i_ASN1_BMPSTRING"},
@@ -102,6 +103,7 @@ static ERR_STRING_DATA ASN1_str_functs[]=
{ERR_PACK(0,ASN1_F_D2I_ASN1_TYPE,0), "d2i_ASN1_TYPE"},
{ERR_PACK(0,ASN1_F_D2I_ASN1_TYPE_BYTES,0), "d2i_ASN1_type_bytes"},
{ERR_PACK(0,ASN1_F_D2I_ASN1_UTCTIME,0), "d2i_ASN1_UTCTIME"},
+{ERR_PACK(0,ASN1_F_D2I_BASIC_CONSTRAINTS,0), "D2I_BASIC_CONSTRAINTS"},
{ERR_PACK(0,ASN1_F_D2I_DHPARAMS,0), "D2I_DHPARAMS"},
{ERR_PACK(0,ASN1_F_D2I_DSAPARAMS,0), "D2I_DSAPARAMS"},
{ERR_PACK(0,ASN1_F_D2I_DSAPRIVATEKEY,0), "D2I_DSAPRIVATEKEY"},
diff --git a/crypto/asn1/t_x509.c b/crypto/asn1/t_x509.c
index 060f99d5a8..f0534efc09 100644
--- a/crypto/asn1/t_x509.c
+++ b/crypto/asn1/t_x509.c
@@ -68,6 +68,7 @@
#endif
#include "objects.h"
#include "x509.h"
+#include "x509v3.h"
#ifndef NO_FP_API
int X509_print_fp(fp,x)
@@ -190,7 +191,9 @@ X509 *x;
BIO_printf(bp,"%8sX509v3 extensions:\n","");
for (i=0; i<n; i++)
{
+#if 0
int data_type,pack_type;
+#endif
ASN1_OBJECT *obj;
ex=X509_get_ext(x,i);
@@ -200,7 +203,7 @@ X509 *x;
j=X509_EXTENSION_get_critical(ex);
if (BIO_printf(bp,": %s\n%16s",j?"critical":"","") <= 0)
goto err;
-
+#if 0
pack_type=X509v3_pack_type_by_OBJ(obj);
data_type=X509v3_data_type_by_OBJ(obj);
@@ -231,7 +234,8 @@ X509 *x;
}
}
}
- else
+#endif
+ if(!X509V3_EXT_print(bp, ex, 0))
{
ASN1_OCTET_STRING_print(bp,ex->value);
}