diff --git a/const-oid/oiddbgen/rfc8894.md b/const-oid/oiddbgen/rfc8894.md new file mode 100644 index 000000000..3b0f34449 --- /dev/null +++ b/const-oid/oiddbgen/rfc8894.md @@ -0,0 +1,22 @@ +Simple Certificate Enrolment Protocol +------------------------------------- + +RFC 8894 unfortunately formatted the SCEP OIDs in a table, that can't +be parsed easily. For this reason the definitions are repeated here +in a parseable format. + +# SCEP Secure Message Objects +## 3.2. SCEP pkiMessage +### 3.2.1. Signed Transaction Attributes + +id-VeriSign OBJECT IDENTIFIER ::= {2 16 US(840) 1 VeriSign(113733)} +id-pki OBJECT IDENTIFIER ::= {id-VeriSign pki(1)} +id-attributes OBJECT IDENTIFIER ::= {id-pki attributes(9)} +id-transactionID OBJECT IDENTIFIER ::= {id-attributes transactionID(7)} +id-messageType OBJECT IDENTIFIER ::= {id-attributes messageType(2)} +id-pkiStatus OBJECT IDENTIFIER ::= {id-attributes pkiStatus(3)} +id-failInfo OBJECT IDENTIFIER ::= {id-attributes failInfo(4)} +id-senderNonce OBJECT IDENTIFIER ::= {id-attributes senderNonce(5)} +id-recipientNonce OBJECT IDENTIFIER ::= {id-attributes recipientNonce(6)} +id-scep OBJECT IDENTIFIER ::= {id-pkix 24} +id-scep-failInfoText OBJECT IDENTIFIER ::= {id-scep 1} diff --git a/const-oid/oiddbgen/src/main.rs b/const-oid/oiddbgen/src/main.rs index 5a8a6aec4..7c36584f8 100644 --- a/const-oid/oiddbgen/src/main.rs +++ b/const-oid/oiddbgen/src/main.rs @@ -16,8 +16,11 @@ const RFCS: &[(&str, &str)] = &[ ("rfc7299", include_str!("../rfc7299.txt")), ]; +const MDS: &[(&str, &str)] = &[("rfc8894", include_str!("../rfc8894.md"))]; + // Bases defined in other places. const BASES: &[(&str, &str)] = &[("id-ad-ocsp", "1.3.6.1.5.5.7.48.1")]; +const NO_BASES: &[(&str, &str)] = &[("", "")]; fn main() { let mut root = Root::default(); @@ -32,5 +35,11 @@ fn main() { } } + for (spec, body) in MDS { + for (name, obid) in Asn1Parser::new(body, NO_BASES).iter() { + root.add(spec, &name, &obid); + } + } + println!("{}", root.module()); } diff --git a/const-oid/src/db/gen.rs b/const-oid/src/db/gen.rs index 74945a494..d70e5e0fa 100644 --- a/const-oid/src/db/gen.rs +++ b/const-oid/src/db/gen.rs @@ -2245,6 +2245,26 @@ pub mod rfc8284 { crate::ObjectIdentifier::new_unwrap("1.3.6.1.1.23.1"); pub const JID: crate::ObjectIdentifier = crate::ObjectIdentifier::new_unwrap("1.3.6.1.1.23.2"); } +pub mod rfc8894 { + pub const ID_VERI_SIGN: crate::ObjectIdentifier = + crate::ObjectIdentifier::new_unwrap("2.16.840.1.113733"); + pub const ID_PKI: crate::ObjectIdentifier = + crate::ObjectIdentifier::new_unwrap("2.16.840.1.113733.1"); + pub const ID_ATTRIBUTES: crate::ObjectIdentifier = + crate::ObjectIdentifier::new_unwrap("2.16.840.1.113733.1.9"); + pub const ID_MESSAGE_TYPE: crate::ObjectIdentifier = + crate::ObjectIdentifier::new_unwrap("2.16.840.1.113733.1.9.2"); + pub const ID_PKI_STATUS: crate::ObjectIdentifier = + crate::ObjectIdentifier::new_unwrap("2.16.840.1.113733.1.9.3"); + pub const ID_FAIL_INFO: crate::ObjectIdentifier = + crate::ObjectIdentifier::new_unwrap("2.16.840.1.113733.1.9.4"); + pub const ID_SENDER_NONCE: crate::ObjectIdentifier = + crate::ObjectIdentifier::new_unwrap("2.16.840.1.113733.1.9.5"); + pub const ID_RECIPIENT_NONCE: crate::ObjectIdentifier = + crate::ObjectIdentifier::new_unwrap("2.16.840.1.113733.1.9.6"); + pub const ID_TRANSACTION_ID: crate::ObjectIdentifier = + crate::ObjectIdentifier::new_unwrap("2.16.840.1.113733.1.9.7"); +} pub const DB: super::Database<'static> = super::Database(&[ (&rfc1274::TEXT_ENCODED_OR_ADDRESS, "textEncodedORAddress"), (&rfc1274::OTHER_MAILBOX, "otherMailbox"), @@ -4185,4 +4205,13 @@ pub const DB: super::Database<'static> = super::Database(&[ ), (&rfc8284::JID_OBJECT, "JIDObject"), (&rfc8284::JID, "jid"), + (&rfc8894::ID_VERI_SIGN, "id-VeriSign"), + (&rfc8894::ID_PKI, "id-pki"), + (&rfc8894::ID_ATTRIBUTES, "id-attributes"), + (&rfc8894::ID_MESSAGE_TYPE, "id-messageType"), + (&rfc8894::ID_PKI_STATUS, "id-pkiStatus"), + (&rfc8894::ID_FAIL_INFO, "id-failInfo"), + (&rfc8894::ID_SENDER_NONCE, "id-senderNonce"), + (&rfc8894::ID_RECIPIENT_NONCE, "id-recipientNonce"), + (&rfc8894::ID_TRANSACTION_ID, "id-transactionID"), ]);