Skip to content

Commit

Permalink
Merge RFC3820 source into mainstream 0.9.7-stable.
Browse files Browse the repository at this point in the history
  • Loading branch information
levitte committed Apr 11, 2005
1 parent 9addd9b commit 93aeac6
Show file tree
Hide file tree
Showing 25 changed files with 968 additions and 75 deletions.
6 changes: 6 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
*) Undo Cygwin change.
[Ulf M�ller]

*) Added support for proxy certificates according to RFC 3820.
Because they may be a security thread to unaware applications,
they must be explicitely allowed in run-time. See
docs/HOWTO/proxy_certificates.txt for further information.
[Richard Levitte]

Changes between 0.9.7e and 0.9.7f [22 Mar 2005]

*) Use (SSL_RANDOM_VALUE - 4) bytes of pseudo random data when generating
Expand Down
2 changes: 1 addition & 1 deletion STATUS
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

OpenSSL STATUS Last modified at
______________ $Date: 2005/03/22 18:17:22 $
______________ $Date: 2005/04/11 15:03:37 $

DEVELOPMENT STATE

Expand Down
53 changes: 53 additions & 0 deletions apps/openssl-vms.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -258,3 +258,56 @@ basicConstraints = CA:true

# issuerAltName=issuer:copy
authorityKeyIdentifier=keyid:always,issuer:always

[ proxy_cert_ext ]
# These extensions should be added when creating a proxy certificate

# This goes against PKIX guidelines but some CAs do it and some software
# requires this to avoid interpreting an end user certificate as a CA.

basicConstraints=CA:FALSE

# Here are some examples of the usage of nsCertType. If it is omitted
# the certificate can be used for anything *except* object signing.

# This is OK for an SSL server.
# nsCertType = server

# For an object signing certificate this would be used.
# nsCertType = objsign

# For normal client use this is typical
# nsCertType = client, email

# and for everything including object signing:
# nsCertType = client, email, objsign

# This is typical in keyUsage for a client certificate.
# keyUsage = nonRepudiation, digitalSignature, keyEncipherment

# This will be displayed in Netscape's comment listbox.
nsComment = "OpenSSL Generated Certificate"

# PKIX recommendations harmless if included in all certificates.
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid,issuer:always

# This stuff is for subjectAltName and issuerAltname.
# Import the email address.
# subjectAltName=email:copy
# An alternative to produce certificates that aren't
# deprecated according to PKIX.
# subjectAltName=email:move

# Copy subject details
# issuerAltName=issuer:copy

#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem
#nsBaseUrl
#nsRevocationUrl
#nsRenewalUrl
#nsCaPolicyUrl
#nsSslServerName

# This really needs to be in place for it to be a proxy certificate.
proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:3,policy:foo
53 changes: 53 additions & 0 deletions apps/openssl.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -258,3 +258,56 @@ basicConstraints = CA:true

# issuerAltName=issuer:copy
authorityKeyIdentifier=keyid:always,issuer:always

[ proxy_cert_ext ]
# These extensions should be added when creating a proxy certificate

# This goes against PKIX guidelines but some CAs do it and some software
# requires this to avoid interpreting an end user certificate as a CA.

basicConstraints=CA:FALSE

# Here are some examples of the usage of nsCertType. If it is omitted
# the certificate can be used for anything *except* object signing.

# This is OK for an SSL server.
# nsCertType = server

# For an object signing certificate this would be used.
# nsCertType = objsign

# For normal client use this is typical
# nsCertType = client, email

# and for everything including object signing:
# nsCertType = client, email, objsign

# This is typical in keyUsage for a client certificate.
# keyUsage = nonRepudiation, digitalSignature, keyEncipherment

# This will be displayed in Netscape's comment listbox.
nsComment = "OpenSSL Generated Certificate"

# PKIX recommendations harmless if included in all certificates.
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid,issuer:always

# This stuff is for subjectAltName and issuerAltname.
# Import the email address.
# subjectAltName=email:copy
# An alternative to produce certificates that aren't
# deprecated according to PKIX.
# subjectAltName=email:move

# Copy subject details
# issuerAltName=issuer:copy

#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem
#nsBaseUrl
#nsRevocationUrl
#nsRenewalUrl
#nsCaPolicyUrl
#nsSslServerName

# This really needs to be in place for it to be a proxy certificate.
proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:3,policy:foo
2 changes: 1 addition & 1 deletion crypto/crypto-lib.com
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ $ LIB_X509 = "x509_def,x509_d2,x509_r2x,x509_cmp,"+ -
$ LIB_X509V3 = "v3_bcons,v3_bitst,v3_conf,v3_extku,v3_ia5,v3_lib,"+ -
"v3_prn,v3_utl,v3err,v3_genn,v3_alt,v3_skey,v3_akey,v3_pku,"+ -
"v3_int,v3_enum,v3_sxnet,v3_cpols,v3_crld,v3_purp,v3_info,"+ -
"v3_ocsp,v3_akeya"
"v3_ocsp,v3_akeya,v3_pcia,v3_pci"
$ LIB_CONF = "conf_err,conf_lib,conf_api,conf_def,conf_mod,conf_mall,conf_sap"
$ LIB_TXT_DB = "txt_db"
$ LIB_PKCS7 = "pk7_asn1,pk7_lib,pkcs7err,pk7_doit,pk7_smime,pk7_attr,"+ -
Expand Down
39 changes: 34 additions & 5 deletions crypto/objects/obj_dat.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@
* [including the GNU Public Licence.]
*/

#define NUM_NID 662
#define NUM_SN 655
#define NUM_LN 655
#define NUM_OBJ 619
#define NUM_NID 668
#define NUM_SN 660
#define NUM_LN 660
#define NUM_OBJ 624

static unsigned char lvalues[4461]={
static unsigned char lvalues[4500]={
0x00, /* [ 0] OBJ_undef */
0x2A,0x86,0x48,0x86,0xF7,0x0D, /* [ 1] OBJ_rsadsi */
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, /* [ 7] OBJ_pkcs */
Expand Down Expand Up @@ -687,6 +687,11 @@ static unsigned char lvalues[4461]={
0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x14,0x02,0x03,/* [4444] OBJ_ms_upn */
0x55,0x04,0x09, /* [4454] OBJ_streetAddress */
0x55,0x04,0x11, /* [4457] OBJ_postalCode */
0x2B,0x06,0x01,0x05,0x05,0x07,0x15, /* [4460] OBJ_id_ppl */
0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x0E, /* [4467] OBJ_proxyCertInfo */
0x2B,0x06,0x01,0x05,0x05,0x07,0x15,0x00, /* [4475] OBJ_id_ppl_anyLanguage */
0x2B,0x06,0x01,0x05,0x05,0x07,0x15,0x01, /* [4483] OBJ_id_ppl_inheritAll */
0x2B,0x06,0x01,0x05,0x05,0x07,0x15,0x02, /* [4491] OBJ_Independent */
};

static ASN1_OBJECT nid_objs[NUM_NID]={
Expand Down Expand Up @@ -1742,6 +1747,15 @@ static ASN1_OBJECT nid_objs[NUM_NID]={
{"DES-EDE3-CFB8","des-ede3-cfb8",NID_des_ede3_cfb8,0,NULL},
{"streetAddress","streetAddress",NID_streetAddress,3,&(lvalues[4454]),0},
{"postalCode","postalCode",NID_postalCode,3,&(lvalues[4457]),0},
{"id-ppl","id-ppl",NID_id_ppl,7,&(lvalues[4460]),0},
{"proxyCertInfo","Proxy Certificate Information",NID_proxyCertInfo,8,
&(lvalues[4467]),0},
{"id-ppl-anyLanguage","Any language",NID_id_ppl_anyLanguage,8,
&(lvalues[4475]),0},
{"id-ppl-inheritAll","Inherit all",NID_id_ppl_inheritAll,8,
&(lvalues[4483]),0},
{NULL,NULL,NID_undef,0,NULL},
{"id-ppl-independent","Independent",NID_Independent,8,&(lvalues[4491]),0},
};

static ASN1_OBJECT *sn_objs[NUM_SN]={
Expand Down Expand Up @@ -2046,6 +2060,10 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={
&(nid_objs[271]),/* "id-pkix1-explicit-93" */
&(nid_objs[270]),/* "id-pkix1-implicit-88" */
&(nid_objs[272]),/* "id-pkix1-implicit-93" */
&(nid_objs[662]),/* "id-ppl" */
&(nid_objs[664]),/* "id-ppl-anyLanguage" */
&(nid_objs[667]),/* "id-ppl-independent" */
&(nid_objs[665]),/* "id-ppl-inheritAll" */
&(nid_objs[267]),/* "id-qcs" */
&(nid_objs[359]),/* "id-qcs-pkixQCSyntax-v1" */
&(nid_objs[259]),/* "id-qt" */
Expand Down Expand Up @@ -2221,6 +2239,7 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={
&(nid_objs[415]),/* "prime256v1" */
&(nid_objs[385]),/* "private" */
&(nid_objs[84]),/* "privateKeyUsagePeriod" */
&(nid_objs[663]),/* "proxyCertInfo" */
&(nid_objs[510]),/* "pseudonym" */
&(nid_objs[435]),/* "pss" */
&(nid_objs[286]),/* "qcStatements" */
Expand Down Expand Up @@ -2406,6 +2425,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
&(nid_objs[363]),/* "AD Time Stamping" */
&(nid_objs[405]),/* "ANSI X9.62" */
&(nid_objs[368]),/* "Acceptable OCSP Responses" */
&(nid_objs[664]),/* "Any language" */
&(nid_objs[177]),/* "Authority Information Access" */
&(nid_objs[365]),/* "Basic OCSP Response" */
&(nid_objs[285]),/* "Biometric Info" */
Expand All @@ -2428,6 +2448,8 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
&(nid_objs[296]),/* "IPSec User" */
&(nid_objs[182]),/* "ISO Member Body" */
&(nid_objs[183]),/* "ISO US Member Body" */
&(nid_objs[667]),/* "Independent" */
&(nid_objs[665]),/* "Inherit all" */
&(nid_objs[142]),/* "Invalidity Date" */
&(nid_objs[504]),/* "MIME MHS" */
&(nid_objs[388]),/* "Mail" */
Expand Down Expand Up @@ -2468,6 +2490,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
&(nid_objs[164]),/* "Policy Qualifier CPS" */
&(nid_objs[165]),/* "Policy Qualifier User Notice" */
&(nid_objs[385]),/* "Private" */
&(nid_objs[663]),/* "Proxy Certificate Information" */
&(nid_objs[ 1]),/* "RSA Data Security, Inc." */
&(nid_objs[ 2]),/* "RSA Data Security, Inc. PKCS" */
&(nid_objs[188]),/* "S/MIME" */
Expand Down Expand Up @@ -2704,6 +2727,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
&(nid_objs[271]),/* "id-pkix1-explicit-93" */
&(nid_objs[270]),/* "id-pkix1-implicit-88" */
&(nid_objs[272]),/* "id-pkix1-implicit-93" */
&(nid_objs[662]),/* "id-ppl" */
&(nid_objs[267]),/* "id-qcs" */
&(nid_objs[359]),/* "id-qcs-pkixQCSyntax-v1" */
&(nid_objs[259]),/* "id-qt" */
Expand Down Expand Up @@ -3310,6 +3334,7 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={
&(nid_objs[266]),/* OBJ_id_aca 1 3 6 1 5 5 7 10 */
&(nid_objs[267]),/* OBJ_id_qcs 1 3 6 1 5 5 7 11 */
&(nid_objs[268]),/* OBJ_id_cct 1 3 6 1 5 5 7 12 */
&(nid_objs[662]),/* OBJ_id_ppl 1 3 6 1 5 5 7 21 */
&(nid_objs[176]),/* OBJ_id_ad 1 3 6 1 5 5 7 48 */
&(nid_objs[507]),/* OBJ_id_hex_partial_message 1 3 6 1 7 1 1 1 */
&(nid_objs[508]),/* OBJ_id_hex_multipart_message 1 3 6 1 7 1 1 2 */
Expand Down Expand Up @@ -3363,6 +3388,7 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={
&(nid_objs[292]),/* OBJ_sbqp_routerIdentifier 1 3 6 1 5 5 7 1 9 */
&(nid_objs[397]),/* OBJ_ac_proxying 1 3 6 1 5 5 7 1 10 */
&(nid_objs[398]),/* OBJ_sinfo_access 1 3 6 1 5 5 7 1 11 */
&(nid_objs[663]),/* OBJ_proxyCertInfo 1 3 6 1 5 5 7 1 14 */
&(nid_objs[164]),/* OBJ_id_qt_cps 1 3 6 1 5 5 7 2 1 */
&(nid_objs[165]),/* OBJ_id_qt_unotice 1 3 6 1 5 5 7 2 2 */
&(nid_objs[293]),/* OBJ_textNotice 1 3 6 1 5 5 7 2 3 */
Expand Down Expand Up @@ -3433,6 +3459,9 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={
&(nid_objs[360]),/* OBJ_id_cct_crs 1 3 6 1 5 5 7 12 1 */
&(nid_objs[361]),/* OBJ_id_cct_PKIData 1 3 6 1 5 5 7 12 2 */
&(nid_objs[362]),/* OBJ_id_cct_PKIResponse 1 3 6 1 5 5 7 12 3 */
&(nid_objs[664]),/* OBJ_id_ppl_anyLanguage 1 3 6 1 5 5 7 21 0 */
&(nid_objs[665]),/* OBJ_id_ppl_inheritAll 1 3 6 1 5 5 7 21 1 */
&(nid_objs[667]),/* OBJ_Independent 1 3 6 1 5 5 7 21 2 */
&(nid_objs[178]),/* OBJ_ad_OCSP 1 3 6 1 5 5 7 48 1 */
&(nid_objs[179]),/* OBJ_ad_ca_issuers 1 3 6 1 5 5 7 48 2 */
&(nid_objs[363]),/* OBJ_ad_timeStamping 1 3 6 1 5 5 7 48 3 */
Expand Down
24 changes: 24 additions & 0 deletions crypto/objects/obj_mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -950,6 +950,10 @@
#define NID_id_cct 268
#define OBJ_id_cct OBJ_id_pkix,12L

#define SN_id_ppl "id-ppl"
#define NID_id_ppl 662
#define OBJ_id_ppl OBJ_id_pkix,21L

#define SN_id_ad "id-ad"
#define NID_id_ad 176
#define OBJ_id_ad OBJ_id_pkix,48L
Expand Down Expand Up @@ -1065,6 +1069,11 @@
#define NID_sinfo_access 398
#define OBJ_sinfo_access OBJ_id_pe,11L

#define SN_proxyCertInfo "proxyCertInfo"
#define LN_proxyCertInfo "Proxy Certificate Information"
#define NID_proxyCertInfo 663
#define OBJ_proxyCertInfo OBJ_id_pe,14L

#define SN_id_qt_cps "id-qt-cps"
#define LN_id_qt_cps "Policy Qualifier CPS"
#define NID_id_qt_cps 164
Expand Down Expand Up @@ -1389,6 +1398,21 @@
#define NID_id_cct_PKIResponse 362
#define OBJ_id_cct_PKIResponse OBJ_id_cct,3L

#define SN_id_ppl_anyLanguage "id-ppl-anyLanguage"
#define LN_id_ppl_anyLanguage "Any language"
#define NID_id_ppl_anyLanguage 664
#define OBJ_id_ppl_anyLanguage OBJ_id_ppl,0L

#define SN_id_ppl_inheritAll "id-ppl-inheritAll"
#define LN_id_ppl_inheritAll "Inherit all"
#define NID_id_ppl_inheritAll 665
#define OBJ_id_ppl_inheritAll OBJ_id_ppl,1L

#define SN_Independent "id-ppl-independent"
#define LN_Independent "Independent"
#define NID_Independent 667
#define OBJ_Independent OBJ_id_ppl,2L

#define SN_ad_OCSP "OCSP"
#define LN_ad_OCSP "OCSP"
#define NID_ad_OCSP 178
Expand Down
6 changes: 6 additions & 0 deletions crypto/objects/obj_mac.num
Original file line number Diff line number Diff line change
Expand Up @@ -659,3 +659,9 @@ des_ede3_cfb1 658
des_ede3_cfb8 659
streetAddress 660
postalCode 661
id_ppl 662
proxyCertInfo 663
id_ppl_anyLanguage 664
id_ppl_inheritAll 665
id_ppl_independent 666
Independent 667
7 changes: 7 additions & 0 deletions crypto/objects/objects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ id-pkix 9 : id-pda
id-pkix 10 : id-aca
id-pkix 11 : id-qcs
id-pkix 12 : id-cct
id-pkix 21 : id-ppl
id-pkix 48 : id-ad

# PKIX Modules
Expand Down Expand Up @@ -346,6 +347,7 @@ id-pe 9 : sbqp-routerIdentifier
id-pe 10 : ac-proxying
!Cname sinfo-access
id-pe 11 : subjectInfoAccess : Subject Information Access
id-pe 14 : proxyCertInfo : Proxy Certificate Information

# PKIX policyQualifiers for Internet policy qualifiers
id-qt 1 : id-qt-cps : Policy Qualifier CPS
Expand Down Expand Up @@ -461,6 +463,11 @@ id-cct 1 : id-cct-crs
id-cct 2 : id-cct-PKIData
id-cct 3 : id-cct-PKIResponse

# Predefined Proxy Certificate policy languages
id-ppl 0 : id-ppl-anyLanguage : Any language
id-ppl 1 : id-ppl-inheritAll : Inherit all
id-ppl 2 : id-ppl-independent : Independent

# access descriptors for authority info access extension
!Cname ad-OCSP
id-ad 1 : OCSP : OCSP
Expand Down
11 changes: 6 additions & 5 deletions crypto/x509/x509_txt.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ const char *X509_verify_cert_error_string(long n)
return ("invalid non-CA certificate (has CA markings)");
case X509_V_ERR_PATH_LENGTH_EXCEEDED:
return ("path length constraint exceeded");
case X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED:
return("proxy path length constraint exceeded");
case X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED:
return("proxy cerificates not allowed, please set the appropriate flag");
case X509_V_ERR_INVALID_PURPOSE:
return ("unsupported certificate purpose");
case X509_V_ERR_CERT_UNTRUSTED:
Expand All @@ -142,19 +146,16 @@ const char *X509_verify_cert_error_string(long n)
return("authority and issuer serial number mismatch");
case X509_V_ERR_KEYUSAGE_NO_CERTSIGN:
return("key usage does not include certificate signing");

case X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER:
return("unable to get CRL issuer certificate");

case X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION:
return("unhandled critical extension");

case X509_V_ERR_KEYUSAGE_NO_CRL_SIGN:
return("key usage does not include CRL signing");

case X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE:
return("key usage does not include digital signature");
case X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION:
return("unhandled critical CRL extension");

default:
BIO_snprintf(buf,sizeof buf,"error number %ld",n);
return(buf);
Expand Down
Loading

0 comments on commit 93aeac6

Please sign in to comment.