summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509v3
diff options
context:
space:
mode:
authormarkus <>2003-05-11 21:36:58 +0000
committermarkus <>2003-05-11 21:36:58 +0000
commit1c98a87f0daac81245653c227eb2f2508a22a965 (patch)
tree3de6d603296ec563b936da4e6a8a1e33d48f8884 /src/lib/libcrypto/x509v3
parent31392c89d1135cf2a416f97295f6d21681b3fbc4 (diff)
downloadopenbsd-1c98a87f0daac81245653c227eb2f2508a22a965.tar.gz
openbsd-1c98a87f0daac81245653c227eb2f2508a22a965.tar.bz2
openbsd-1c98a87f0daac81245653c227eb2f2508a22a965.zip
import 0.9.7b (without idea and rc5)
Diffstat (limited to 'src/lib/libcrypto/x509v3')
-rw-r--r--src/lib/libcrypto/x509v3/ext_dat.h6
-rw-r--r--src/lib/libcrypto/x509v3/v3_info.c2
-rw-r--r--src/lib/libcrypto/x509v3/v3_ocsp.c3
-rw-r--r--src/lib/libcrypto/x509v3/v3_prn.c2
-rw-r--r--src/lib/libcrypto/x509v3/v3_purp.c4
-rw-r--r--src/lib/libcrypto/x509v3/v3_utl.c2
-rw-r--r--src/lib/libcrypto/x509v3/x509v3.h1
7 files changed, 17 insertions, 3 deletions
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 e1cf01a9b4..e269df1373 100644
--- a/src/lib/libcrypto/x509v3/v3_info.c
+++ b/src/lib/libcrypto/x509v3/v3_info.c
@@ -113,7 +113,7 @@ 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 ntmp = OPENSSL_malloc(strlen(objtmp) + strlen(vtmp->name) + 5); 117 ntmp = OPENSSL_malloc(strlen(objtmp) + strlen(vtmp->name) + 5);
118 if(!ntmp) { 118 if(!ntmp) {
119 X509V3err(X509V3_F_I2V_AUTHORITY_INFO_ACCESS, 119 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
270err: 272err:
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/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