summaryrefslogtreecommitdiffstats
path: root/crypto/asymmetric_keys/x509_akid.asn1
diff options
context:
space:
mode:
authorDavid Howells2015-07-20 22:16:26 +0200
committerDavid Howells2015-08-07 17:26:13 +0200
commitb92e6570a992c7d793a209db282f68159368201c (patch)
tree37f9f533b4d28508fca8c1f6c1229c0182d47acc /crypto/asymmetric_keys/x509_akid.asn1
parentASN.1: Copy string names to tokens in ASN.1 compiler (diff)
downloadkernel-qcow2-linux-b92e6570a992c7d793a209db282f68159368201c.tar.gz
kernel-qcow2-linux-b92e6570a992c7d793a209db282f68159368201c.tar.xz
kernel-qcow2-linux-b92e6570a992c7d793a209db282f68159368201c.zip
X.509: Extract both parts of the AuthorityKeyIdentifier
Extract both parts of the AuthorityKeyIdentifier, not just the keyIdentifier, as the second part can be used to match X.509 certificates by issuer and serialNumber. Signed-off-by: David Howells <dhowells@redhat.com> Tested-by: Vivek Goyal <vgoyal@redhat.com>
Diffstat (limited to 'crypto/asymmetric_keys/x509_akid.asn1')
-rw-r--r--crypto/asymmetric_keys/x509_akid.asn135
1 files changed, 35 insertions, 0 deletions
diff --git a/crypto/asymmetric_keys/x509_akid.asn1 b/crypto/asymmetric_keys/x509_akid.asn1
new file mode 100644
index 000000000000..1a33231a75a8
--- /dev/null
+++ b/crypto/asymmetric_keys/x509_akid.asn1
@@ -0,0 +1,35 @@
+-- X.509 AuthorityKeyIdentifier
+-- rfc5280 section 4.2.1.1
+
+AuthorityKeyIdentifier ::= SEQUENCE {
+ keyIdentifier [0] IMPLICIT KeyIdentifier OPTIONAL,
+ authorityCertIssuer [1] IMPLICIT GeneralNames OPTIONAL,
+ authorityCertSerialNumber [2] IMPLICIT CertificateSerialNumber OPTIONAL
+ }
+
+KeyIdentifier ::= OCTET STRING ({ x509_akid_note_kid })
+
+CertificateSerialNumber ::= INTEGER ({ x509_akid_note_serial })
+
+GeneralNames ::= SEQUENCE OF GeneralName
+
+GeneralName ::= CHOICE {
+ otherName [0] ANY,
+ rfc822Name [1] IA5String,
+ dNSName [2] IA5String,
+ x400Address [3] ANY,
+ directoryName [4] Name ({ x509_akid_note_name }),
+ ediPartyName [5] ANY,
+ uniformResourceIdentifier [6] IA5String,
+ iPAddress [7] OCTET STRING,
+ registeredID [8] OBJECT IDENTIFIER
+ }
+
+Name ::= SEQUENCE OF RelativeDistinguishedName
+
+RelativeDistinguishedName ::= SET OF AttributeValueAssertion
+
+AttributeValueAssertion ::= SEQUENCE {
+ attributeType OBJECT IDENTIFIER ({ x509_note_OID }),
+ attributeValue ANY ({ x509_extract_name_segment })
+ }