5. Examples Using the Original Approach in RFC 7030
This section preserves the RFC text for EST CSR Attributes, including CSR attribute OIDs and values, ASN.1 syntax, id-ExtensionReq, CertificationRequestInfoTemplate, Base64 examples, ASN.1 dump output, IANA registrations, and security considerations.
Original RFC Text
5. Examples Using the Original Approach in RFC 7030
Each example has a high-level (English) explanation of what is
expected. Some mapping back to the Attribute and Extension
definitions above are included. The base64 DER encoding is then
shown. The output of "dumpasn1" [dumpasn1] is then provided to
detail what the contents are.
5.1. Require an RFC 8994 / ACP subjectAltName with Specific otherName
A single subjectAltName extension is specified in a single CsrAttrs
attribute [RFC7030] with an OID 'id-ExtensionReq' indicating type
Extensions. This is what might be created by a Registrar [RFC8995]
that is asking for AcpNodeName [RFC8994] with format 'otherNames'.
5.1.1. Base64-Encoded Example
The Base64:
MGgwZgYJKoZIhvcNAQkOMVkwVzBVBgNVHREBAf8ESzBJoEcG
CCsGAQUFBwgKoDsWOXJmYzg5OTQrZmQ3MzlmYzIzYzM0NDAx
MTIyMzM0NDU1MDAwMDAwMDArQGFjcC5leGFtcGxlLmNvbQ==
5.1.2. ASN.1 DUMP Output
There is a single subjectAltName Extension with an Attribute with
Extension type.
<30 68>
0 104: SEQUENCE {
<30 66>
2 102: SEQUENCE {
<06 09>
4 9: OBJECT IDENTIFIER
: extensionRequest (1 2 840 113549 1 9 14)
: (PKCS #9 via CRMF)
<31 59>
15 89: SET {
<30 57>
17 87: SEQUENCE {
<30 55>
19 85: SEQUENCE {
<06 03>
21 3: OBJECT IDENTIFIER
: subjectAltName (2 5 29 17)
: (X.509 extension)
<01 01>
26 1: BOOLEAN TRUE
<04 4B>
29 75: OCTET STRING, encapsulates {
<30 49>
31 73: SEQUENCE {
<A0 47>
33 71: [0] {
<06 08>
35 8: OBJECT IDENTIFIER '1 3 6 1 5 5 7 8 10'
<A0 3B>
45 59: [0] {
<16 39>
47 57: IA5String
: 'rfc8994+fd739fc23c34401122334455'
: '[email protected]'
: }
: }
: }
: }
: }
: }
: }
: }
: }
5.2. Original Example in RFC 7030
In this example, taken from Section 4.5.2 of [RFC7030], a few
different attributes are included. The original encoding of the
'macAddress' part in the example is NOT CORRECT. It was not aligned
with the definition of the Extension Request attribute as specified
in Section 5.4.2 of [RFC2985]. The revised encoding given here does
not use an 'id-ExtensionReq' attribute because the MAC Address is not
an X.509 certificate extension by itself and because the server
provides its OID without a value, which is not allowed syntactically
within a structure of type 'Extension'.
5.2.1. Base64-Encoded Example
The Base64:
MDIGCSqGSIb3DQEJBzASBgcqhkjOPQIBMQcGBSuBBAAiBgcr
BgEBAQEWBggqhkjOPQQDAw==
5.2.2. ASN.1 DUMP Output
The CsrAttrs structure contains:
1. The challengePassword attribute to indicate that the CSR should
include this value.
2. An ecPublicKey OID with the value secp384r1 to indicate what kind
of public key should be submitted.
3. The macAddress OID 1.3.6.1.1.1.1.22 to indicate that the CSR is
expected to include (in a subjectDirectoryAttributes extension) a
MAC address value.
4. The ecdsaWithSHA384 OID to indicate what kind of hash is expected
to be used for the self-signature in the PKCS#10 CSR.
<30 32>
0 50: SEQUENCE {
<06 09>
2 9: OBJECT IDENTIFIER challengePassword (1 2 840 113549 1 9 7)
: (PKCS #9)
<30 12>
13 18: SEQUENCE {
<06 07>
15 7: OBJECT IDENTIFIER ecPublicKey (1 2 840 10045 2 1)
: (ANSI X9.62 public key type)
<31 07>
24 7: SET {
<06 05>
26 5: OBJECT IDENTIFIER secp384r1 (1 3 132 0 34)
: (SECG (Certicom) named elliptic curve)
: }
: }
<06 07>
33 7: OBJECT IDENTIFIER '1 3 6 1 1 1 1 22'
<06 08>
42 8: OBJECT IDENTIFIER ecdsaWithSHA384 (1 2 840 10045 4 3 3)
: (ANSI X9.62 ECDSA algorithm with SHA384)
: }
5.3. Require a Specific subjectAltName Extension
This example is the same as the previous one except that instead of
the OID for a macAddress, a subjectAltName is specified as the only
Extension element.
5.3.1. Base64-Encoded Example
The Base64:
MEUGCSqGSIb3DQEJBzASBgcqhkjOPQIBMQcGBSuBBAAjBgkq
hkiG9w0BCRQGCgmSJomT8ixkAQUGA1UEBQYIKoZIzj0EAwQ=
5.3.2. ASN.1 DUMP Output
The CsrAttrs structure contains:
1. The challengePassword attribute to indicate that the CSR should
include this value.
2. An ecPublicKey OID with the value secp521r1 to indicate what kind
of public key should be submitted.
3. An extensionRequest container with a subjectAltName value
containing the name [email protected].
4. The ecdsaWithSHA512 OID to indicate the SHA-512 hash is expected
to be used for the self-signature in the PKCS#10 CSR.
<30 45>
0 69: SEQUENCE {
<06 09>
2 9: OBJECT IDENTIFIER challengePassword (1 2 840 113549 1 9 7)
: (PKCS #9)
<30 12>
13 18: SEQUENCE {
<06 07>
15 7: OBJECT IDENTIFIER ecPublicKey (1 2 840 10045 2 1)
: (ANSI X9.62 public key type)
<31 07>
24 7: SET {
<06 05>
26 5: OBJECT IDENTIFIER secp521r1 (1 3 132 0 35)
: (SECG (Certicom) named elliptic curve)
: }
: }
<06 09>
33 9: OBJECT IDENTIFIER friendlyName (for PKCS #12)
(1 2 840 113549 1 9 20)
: (PKCS #9 via PKCS #12)
<06 0A>
44 10: OBJECT IDENTIFIER '0 9 2342 19200300 100 1 5'
<06 03>
56 3: OBJECT IDENTIFIER serialNumber (2 5 4 5)
: (X.520 DN component)
<06 08>
61 8: OBJECT IDENTIFIER ecdsaWithSHA512 (1 2 840 10045 4 3 4)
: (ANSI X9.62 ECDSA algorithm with SHA512)
: }
5.4. Require a Public Key of a Specific Size
The CSR requires an RSA public key of a specific size.
5.4.1. Base64-Encoded Example
The Base64:
MCkGCSqGSIb3DQEJBzARBgkqhkiG9w0BAQExBAICEAAGCSqG
SIb3DQEBCw==
5.4.2. ASN.1 DUMP Output
Provide a CSR with an RSA key that's 4096 bits and use SHA256 as the
hash algorithm within the signature.
<30 29>
0 41: SEQUENCE {
<06 09>
2 9: OBJECT IDENTIFIER challengePassword (1 2 840 113549 1 9 7)
: (PKCS #9)
<30 11>
13 17: SEQUENCE {
<06 09>
15 9: OBJECT IDENTIFIER rsaEncryption (1 2 840 113549 1 1 1)
: (PKCS #1)
<31 04>
26 4: SET {
<02 02>
28 2: INTEGER 4096
: }
: }
<06 09>
32 9: OBJECT IDENTIFIER sha256WithRSAEncryption
(1 2 840 113549 1 1 11)
: (PKCS #1)
: }
5.5. Require a Public Key of a Specific Curve
The CSR requires an ECC public key with a specific curve.
5.5.1. Base64-Encoded Example
The Base64:
MC4GCSqGSIb3DQEJBzASBgcqhkjOPQIBMQcGBSuBBAAiBgNV
BAUGCCqGSM49BAMD
5.5.2. ASN.1 DUMP Output
Provide a CSR with an ECC public key from p384, include your serial
number, and use SHA384 as the hash algorithm within the signature.
<30 2E>
0 46: SEQUENCE {
<06 09>
2 9: OBJECT IDENTIFIER challengePassword (1 2 840 113549 1 9 7)
: (PKCS #9)
<30 12>
13 18: SEQUENCE {
<06 07>
15 7: OBJECT IDENTIFIER ecPublicKey (1 2 840 10045 2 1)
: (ANSI X9.62 public key type)
<31 07>
24 7: SET {
<06 05>
26 5: OBJECT IDENTIFIER secp384r1 (1 3 132 0 34)
: (SECG (Certicom) named elliptic curve)
: }
: }
<06 03>
33 3: OBJECT IDENTIFIER serialNumber (2 5 4 5)
: (X.520 DN component)
<06 08>
38 8: OBJECT IDENTIFIER ecdsaWithSHA384 (1 2 840 10045 4 3 3)
: (ANSI X9.62 ECDSA algorithm with SHA384)
: }
5.6. Require Specific Extensions and Attributes
The CSR is required to have an ECC public key, include a serial
number, include a friendly name, include a favorite drink
[favoritedrink] [OID 0.9.2342.19200300.100.1.5], and use SHA512 as
the hash algorithm within the signature.
5.6.1. Base64-Encoded Example
The Base64:
MEUGCSqGSIb3DQEJBzASBgcqhkjOPQIBMQcGBSuBBAAjBgkq
hkiG9w0BCRQGCgmSJomT8ixkAQUGA1UEBQYIKoZIzj0EAwQ=
5.6.2. ASN.1 DUMP Output
Provide a CSR with an ECC public key from sha521 and include your
serial number, friendly name, and favorite drink, and hash it with
SHA512.
<30 45>
0 69: SEQUENCE {
<06 09>
2 9: OBJECT IDENTIFIER challengePassword (1 2 840 113549 1 9 7)
: (PKCS #9)
<30 12>
13 18: SEQUENCE {
<06 07>
15 7: OBJECT IDENTIFIER ecPublicKey (1 2 840 10045 2 1)
: (ANSI X9.62 public key type)
<31 07>
24 7: SET {
<06 05>
26 5: OBJECT IDENTIFIER secp521r1 (1 3 132 0 35)
: (SECG (Certicom) named elliptic curve)
: }
: }
<06 09>
33 9: OBJECT IDENTIFIER friendlyName (for PKCS #12)
(1 2 840 113549 1 9 20)
: (PKCS #9 via PKCS #12)
<06 0A>
44 10: OBJECT IDENTIFIER '0 9 2342 19200300 100 1 5'
<06 03>
56 3: OBJECT IDENTIFIER serialNumber (2 5 4 5)
: (X.520 DN component)
<06 08>
61 8: OBJECT IDENTIFIER ecdsaWithSHA512 (1 2 840 10045 4 3 4)
: (ANSI X9.62 ECDSA algorithm with SHA512)
: }