On 3/30/2012 12:04 AM, Rob Stradling wrote:
> On 29/03/12 22:14, John Nagle wrote:
> <snip>
>> Thanks. I added some technical details about how that data
>> is stored, and mentioned that I'm encouraging the CA/Browser
>> Forum to add a technical appendix to their document.
>>
>> (The storage format is weird. RFC2527 doesn't specify
>> the contents of that field.
>
> RFC2527 references RFC2459 (superseded by RFC3280 and now RFC5280),
> which does specify the contents of the Certificate Policies extension.
RFC 5280 says, at 4.2.1.4,
"The certificate policies extension contains a sequence of one
or more policy information terms, each of which consists of an object
identifier (OID) and optional qualifiers." The syntax reads
certificatePolicies ::= SEQUENCE SIZE (1..MAX) OF PolicyInformation
PolicyInformation ::= SEQUENCE {
policyIdentifier CertPolicyId,
policyQualifiers SEQUENCE SIZE (1..MAX) OF
PolicyQualifierInfo OPTIONAL }
CertPolicyId ::= OBJECT IDENTIFIER
PolicyQualifierInfo ::= SEQUENCE {
policyQualifierId PolicyQualifierId,
qualifier ANY DEFINED BY policyQualifierId }
Nowhere in there is an OctetString.
That's not what the CA/Browser Forum members put there for EV certs.
They put a DER-encoded ASN1 tree in an OctetString field. It
looks like this in the Verisign-issued cert for "
bankofamerica.com".
ObjectIdentifier: 2.5.29.32 certificatePolicies
OctetString: (48, 59, 48, 57, 6, 11, 96, 134, 72, 1, 134, 248,
69, 1, 7, 23, 6, 48, 42, 48, 40, 6, 8, 43, 6, 1, 5, 5, 7, 2, 1, 22, 28,
104, 116, 116, 112, 115, 58, 47, 47, 119, 119, 119, 46, 118, 101, 114,
105, 115, 105, 103, 110, 46, 99, 111, 109, 47, 99, 112, 115)
Certificate Policies - special case - decoding OctetString as
DER ASN1
Sequence:
Sequence:
ObjectIdentifier: 2.16.840.1.113733.1.7.23.6
('
http://www.verisign.com/repository/CPS/VeriSignCPSv3.3.pdf', 'VeriSign')
Sequence:
Sequence:
ObjectIdentifier: 1.3.6.1.5.5.7.2.1 None
OctetString: (104, 116, 116, 112, 115, 58, 47, 47,
119, 119, 119, 46, 118, 101, 114, 105, 115, 105, 103, 110, 46, 99, 111,
109, 47, 99, 112, 115)
OctetString as ASCII: '
https://www.verisign.com/cps'
Dump some real cerificates and take a look. (Not with a browser,
with an ASN1 dumper. Most browsers already know this is a special
case.)
> I think you're referring to the
> definition of an X.509 certificate extension:
>
> Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension
>
> Extension ::= SEQUENCE {
> extnID OBJECT IDENTIFIER,
> critical BOOLEAN DEFAULT FALSE,
> extnValue OCTET STRING }
That's the generic format of an extension, and is what the
CA/Browser Forum relied upon to put unstandardized data into
an X.509 certificate.
> The CABForum doesn't have a habit of re-documenting everything that has
> been in the ITU/ISO and IETF specs for many years!
Point to a published specification which describes putting a second
level of DER-encoded data into an OctetString field in the
certificatePolicies extension.
John Nagle
SiteTruth