diff options
author | markus <> | 2003-05-12 02:18:40 +0000 |
---|---|---|
committer | markus <> | 2003-05-12 02:18:40 +0000 |
commit | d4fcd82bb7f6d603bd61e19a81ba97337b89dfca (patch) | |
tree | d52e3a0f1f08f65ad283027e560e17ed0d720462 /src/lib/libcrypto/x509v3 | |
parent | 582bbd139cd2afd58d10dc051c5b0b989b441074 (diff) | |
download | openbsd-d4fcd82bb7f6d603bd61e19a81ba97337b89dfca.tar.gz openbsd-d4fcd82bb7f6d603bd61e19a81ba97337b89dfca.tar.bz2 openbsd-d4fcd82bb7f6d603bd61e19a81ba97337b89dfca.zip |
merge 0.9.7b with local changes; crank majors for libssl/libcrypto
Diffstat (limited to 'src/lib/libcrypto/x509v3')
-rw-r--r-- | src/lib/libcrypto/x509v3/Makefile.ssl | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/x509v3/ext_dat.h | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/x509v3/v3_info.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/x509v3/v3_ocsp.c | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/x509v3/v3_prn.c | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/x509v3/v3_purp.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/x509v3/v3_utl.c | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/x509v3/v3conf.c | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/x509v3/x509v3.h | 1 |
9 files changed, 20 insertions, 6 deletions
diff --git a/src/lib/libcrypto/x509v3/Makefile.ssl b/src/lib/libcrypto/x509v3/Makefile.ssl index 3534e8b236..66df90c346 100644 --- a/src/lib/libcrypto/x509v3/Makefile.ssl +++ b/src/lib/libcrypto/x509v3/Makefile.ssl | |||
@@ -74,7 +74,7 @@ lint: | |||
74 | lint -DLINT $(INCLUDES) $(SRC)>fluff | 74 | lint -DLINT $(INCLUDES) $(SRC)>fluff |
75 | 75 | ||
76 | depend: | 76 | depend: |
77 | $(MAKEDEPEND) $(CFLAG) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC) | 77 | $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) |
78 | 78 | ||
79 | dclean: | 79 | dclean: |
80 | $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | 80 | $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new |
diff --git a/src/lib/libcrypto/x509v3/ext_dat.h b/src/lib/libcrypto/x509v3/ext_dat.h index 2fb97d8925..5442480595 100644 --- a/src/lib/libcrypto/x509v3/ext_dat.h +++ b/src/lib/libcrypto/x509v3/ext_dat.h | |||
@@ -90,17 +90,23 @@ static X509V3_EXT_METHOD *standard_exts[] = { | |||
90 | &v3_crld, | 90 | &v3_crld, |
91 | &v3_ext_ku, | 91 | &v3_ext_ku, |
92 | &v3_crl_reason, | 92 | &v3_crl_reason, |
93 | #ifndef OPENSSL_NO_OCSP | ||
93 | &v3_crl_invdate, | 94 | &v3_crl_invdate, |
95 | #endif | ||
94 | &v3_sxnet, | 96 | &v3_sxnet, |
95 | &v3_info, | 97 | &v3_info, |
98 | #ifndef OPENSSL_NO_OCSP | ||
96 | &v3_ocsp_nonce, | 99 | &v3_ocsp_nonce, |
97 | &v3_ocsp_crlid, | 100 | &v3_ocsp_crlid, |
98 | &v3_ocsp_accresp, | 101 | &v3_ocsp_accresp, |
99 | &v3_ocsp_nocheck, | 102 | &v3_ocsp_nocheck, |
100 | &v3_ocsp_acutoff, | 103 | &v3_ocsp_acutoff, |
101 | &v3_ocsp_serviceloc, | 104 | &v3_ocsp_serviceloc, |
105 | #endif | ||
102 | &v3_sinfo, | 106 | &v3_sinfo, |
107 | #ifndef OPENSSL_NO_OCSP | ||
103 | &v3_crl_hold | 108 | &v3_crl_hold |
109 | #endif | ||
104 | }; | 110 | }; |
105 | 111 | ||
106 | /* Number of standard extensions */ | 112 | /* Number of standard extensions */ |
diff --git a/src/lib/libcrypto/x509v3/v3_info.c b/src/lib/libcrypto/x509v3/v3_info.c index 92b9316b02..28cc00686a 100644 --- a/src/lib/libcrypto/x509v3/v3_info.c +++ b/src/lib/libcrypto/x509v3/v3_info.c | |||
@@ -113,8 +113,8 @@ static STACK_OF(CONF_VALUE) *i2v_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD *method | |||
113 | ret = i2v_GENERAL_NAME(method, desc->location, ret); | 113 | ret = i2v_GENERAL_NAME(method, desc->location, ret); |
114 | if(!ret) break; | 114 | if(!ret) break; |
115 | vtmp = sk_CONF_VALUE_value(ret, i); | 115 | vtmp = sk_CONF_VALUE_value(ret, i); |
116 | i2t_ASN1_OBJECT(objtmp, 80, desc->method); | 116 | i2t_ASN1_OBJECT(objtmp, sizeof objtmp, desc->method); |
117 | nlen = strlen(objtmp) + strlen(vtmp->name) + 4; | 117 | nlen = strlen(objtmp) + strlen(vtmp->name) + 5; |
118 | ntmp = OPENSSL_malloc(nlen); | 118 | ntmp = OPENSSL_malloc(nlen); |
119 | if(!ntmp) { | 119 | if(!ntmp) { |
120 | X509V3err(X509V3_F_I2V_AUTHORITY_INFO_ACCESS, | 120 | X509V3err(X509V3_F_I2V_AUTHORITY_INFO_ACCESS, |
diff --git a/src/lib/libcrypto/x509v3/v3_ocsp.c b/src/lib/libcrypto/x509v3/v3_ocsp.c index 083112314e..21badc13f9 100644 --- a/src/lib/libcrypto/x509v3/v3_ocsp.c +++ b/src/lib/libcrypto/x509v3/v3_ocsp.c | |||
@@ -56,6 +56,8 @@ | |||
56 | * | 56 | * |
57 | */ | 57 | */ |
58 | 58 | ||
59 | #ifndef OPENSSL_NO_OCSP | ||
60 | |||
59 | #include <stdio.h> | 61 | #include <stdio.h> |
60 | #include "cryptlib.h" | 62 | #include "cryptlib.h" |
61 | #include <openssl/conf.h> | 63 | #include <openssl/conf.h> |
@@ -270,3 +272,4 @@ static int i2r_ocsp_serviceloc(X509V3_EXT_METHOD *method, void *in, BIO *bp, int | |||
270 | err: | 272 | err: |
271 | return 0; | 273 | return 0; |
272 | } | 274 | } |
275 | #endif | ||
diff --git a/src/lib/libcrypto/x509v3/v3_prn.c b/src/lib/libcrypto/x509v3/v3_prn.c index aeaf6170fe..754808b625 100644 --- a/src/lib/libcrypto/x509v3/v3_prn.c +++ b/src/lib/libcrypto/x509v3/v3_prn.c | |||
@@ -178,7 +178,7 @@ int X509V3_extensions_print(BIO *bp, char *title, STACK_OF(X509_EXTENSION) *exts | |||
178 | ASN1_OBJECT *obj; | 178 | ASN1_OBJECT *obj; |
179 | X509_EXTENSION *ex; | 179 | X509_EXTENSION *ex; |
180 | ex=sk_X509_EXTENSION_value(exts, i); | 180 | ex=sk_X509_EXTENSION_value(exts, i); |
181 | if (BIO_printf(bp,"%*s",indent, "") <= 0) return 0; | 181 | if (indent && BIO_printf(bp,"%*s",indent, "") <= 0) return 0; |
182 | obj=X509_EXTENSION_get_object(ex); | 182 | obj=X509_EXTENSION_get_object(ex); |
183 | i2a_ASN1_OBJECT(bp,obj); | 183 | i2a_ASN1_OBJECT(bp,obj); |
184 | j=X509_EXTENSION_get_critical(ex); | 184 | j=X509_EXTENSION_get_critical(ex); |
diff --git a/src/lib/libcrypto/x509v3/v3_purp.c b/src/lib/libcrypto/x509v3/v3_purp.c index b739e4fd83..4d145f71fd 100644 --- a/src/lib/libcrypto/x509v3/v3_purp.c +++ b/src/lib/libcrypto/x509v3/v3_purp.c | |||
@@ -378,6 +378,10 @@ static void x509v3_cache_extensions(X509 *x) | |||
378 | case NID_time_stamp: | 378 | case NID_time_stamp: |
379 | x->ex_xkusage |= XKU_TIMESTAMP; | 379 | x->ex_xkusage |= XKU_TIMESTAMP; |
380 | break; | 380 | break; |
381 | |||
382 | case NID_dvcs: | ||
383 | x->ex_xkusage |= XKU_DVCS; | ||
384 | break; | ||
381 | } | 385 | } |
382 | } | 386 | } |
383 | sk_ASN1_OBJECT_pop_free(extusage, ASN1_OBJECT_free); | 387 | sk_ASN1_OBJECT_pop_free(extusage, ASN1_OBJECT_free); |
diff --git a/src/lib/libcrypto/x509v3/v3_utl.c b/src/lib/libcrypto/x509v3/v3_utl.c index 283e943e46..34ac2998de 100644 --- a/src/lib/libcrypto/x509v3/v3_utl.c +++ b/src/lib/libcrypto/x509v3/v3_utl.c | |||
@@ -491,7 +491,7 @@ static STACK *get_email(X509_NAME *name, GENERAL_NAMES *gens) | |||
491 | i = -1; | 491 | i = -1; |
492 | /* First supplied X509_NAME */ | 492 | /* First supplied X509_NAME */ |
493 | while((i = X509_NAME_get_index_by_NID(name, | 493 | while((i = X509_NAME_get_index_by_NID(name, |
494 | NID_pkcs9_emailAddress, i)) > 0) { | 494 | NID_pkcs9_emailAddress, i)) >= 0) { |
495 | ne = X509_NAME_get_entry(name, i); | 495 | ne = X509_NAME_get_entry(name, i); |
496 | email = X509_NAME_ENTRY_get_data(ne); | 496 | email = X509_NAME_ENTRY_get_data(ne); |
497 | if(!append_ia5(&ret, email)) return NULL; | 497 | if(!append_ia5(&ret, email)) return NULL; |
diff --git a/src/lib/libcrypto/x509v3/v3conf.c b/src/lib/libcrypto/x509v3/v3conf.c index 67ee14f334..00cf5b4a5b 100644 --- a/src/lib/libcrypto/x509v3/v3conf.c +++ b/src/lib/libcrypto/x509v3/v3conf.c | |||
@@ -118,7 +118,7 @@ int main(int argc, char **argv) | |||
118 | printf("%s", OBJ_nid2ln(OBJ_obj2nid(ext->object))); | 118 | printf("%s", OBJ_nid2ln(OBJ_obj2nid(ext->object))); |
119 | if(ext->critical) printf(",critical:\n"); | 119 | if(ext->critical) printf(",critical:\n"); |
120 | else printf(":\n"); | 120 | else printf(":\n"); |
121 | X509V3_EXT_print_fp(stdout, ext, 0); | 121 | X509V3_EXT_print_fp(stdout, ext, 0, 0); |
122 | printf("\n"); | 122 | printf("\n"); |
123 | 123 | ||
124 | } | 124 | } |
diff --git a/src/lib/libcrypto/x509v3/x509v3.h b/src/lib/libcrypto/x509v3/x509v3.h index daecc55271..fb07a19016 100644 --- a/src/lib/libcrypto/x509v3/x509v3.h +++ b/src/lib/libcrypto/x509v3/x509v3.h | |||
@@ -352,6 +352,7 @@ DECLARE_ASN1_SET_OF(POLICYINFO) | |||
352 | #define XKU_SGC 0x10 | 352 | #define XKU_SGC 0x10 |
353 | #define XKU_OCSP_SIGN 0x20 | 353 | #define XKU_OCSP_SIGN 0x20 |
354 | #define XKU_TIMESTAMP 0x40 | 354 | #define XKU_TIMESTAMP 0x40 |
355 | #define XKU_DVCS 0x80 | ||
355 | 356 | ||
356 | #define X509_PURPOSE_DYNAMIC 0x1 | 357 | #define X509_PURPOSE_DYNAMIC 0x1 |
357 | #define X509_PURPOSE_DYNAMIC_NAME 0x2 | 358 | #define X509_PURPOSE_DYNAMIC_NAME 0x2 |