summaryrefslogtreecommitdiffstats
path: root/vendor/const-oid
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/const-oid')
-rw-r--r--vendor/const-oid/.cargo-checksum.json2
-rw-r--r--vendor/const-oid/CHANGELOG.md24
-rw-r--r--vendor/const-oid/Cargo.toml2
-rw-r--r--vendor/const-oid/src/db.rs38
-rw-r--r--vendor/const-oid/src/db/gen.rs46
5 files changed, 110 insertions, 2 deletions
diff --git a/vendor/const-oid/.cargo-checksum.json b/vendor/const-oid/.cargo-checksum.json
index 0434d372b..2bdbd362b 100644
--- a/vendor/const-oid/.cargo-checksum.json
+++ b/vendor/const-oid/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"CHANGELOG.md":"b9f606f28c74a305a4f3367d130719645dccdef64c56e31f36a2959fa405bbb4","Cargo.toml":"1d0b18b721404ad885aa66bf164ac6a92f487e31fac0d5e8ec8ca4621875773d","LICENSE-APACHE":"a9040321c3712d8fd0b09cf52b17445de04a23a10165049ae187cd39e5c86be5","LICENSE-MIT":"bada9e7ed8dc00d63502053c455d7c8d7575dfb7e8277a2a832531844d900682","README.md":"4a5cdde312d22ca0e6f8c6d4786af313e2a34c06fb572b7ccaef2f1ad19d781d","src/arcs.rs":"997f319f8ff5a3ffc448900993f2bf056c05f1092d48a6a592760bf261468e3d","src/checked.rs":"c3de8e43c638de4766550accb1b73cc7f37765f1779d3e572bfbd908bdb1003f","src/db.rs":"c8312e8688071c262e134f91bb296d34e98389ca1fb1cbc59d144d160a8851ea","src/db/gen.rs":"1746c05380b1162c76594d5b54d754a5bcb6275387358fe031f8701a1d263b12","src/encoder.rs":"cd799ff208a8a7a7a128c422ad3a5535e6ee6b800ad5e7087da55e27e23e84b3","src/error.rs":"0101b991fe689fd2b20c3144e3cfcca3a6628c6892f1ced4c2ba84d6788d72c9","src/lib.rs":"7476a1feb706595867f6e01e16113e167e03420344708c1a0b3a455549c5f82c","src/parser.rs":"9fe5c4114dad22631e63fd1afa832b2c0ed3b4b28f04587dd2148956ced98768","tests/lib.rs":"d7881ad1388e4c907d5392429927d299042dbd5eaaacfd27cef9e1d692fd5aee"},"package":"520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913"} \ No newline at end of file
+{"files":{"CHANGELOG.md":"77941a6f1add625487e4c78120ca4fc32388915e5fa03730653364410d9a06d9","Cargo.toml":"602101805960cea344290d9fdf63f91338a704f3e7c1e8c64c9d374bdfd47639","LICENSE-APACHE":"a9040321c3712d8fd0b09cf52b17445de04a23a10165049ae187cd39e5c86be5","LICENSE-MIT":"bada9e7ed8dc00d63502053c455d7c8d7575dfb7e8277a2a832531844d900682","README.md":"4a5cdde312d22ca0e6f8c6d4786af313e2a34c06fb572b7ccaef2f1ad19d781d","src/arcs.rs":"997f319f8ff5a3ffc448900993f2bf056c05f1092d48a6a592760bf261468e3d","src/checked.rs":"c3de8e43c638de4766550accb1b73cc7f37765f1779d3e572bfbd908bdb1003f","src/db.rs":"75567c122e9f236b02dcaad1b266efcffa452206877c35e2d343aa8eb3b53fad","src/db/gen.rs":"8507d7acb0ed2a42aec07121993deed0578a629ecf54cbe4d6d6a9dd45eb7837","src/encoder.rs":"cd799ff208a8a7a7a128c422ad3a5535e6ee6b800ad5e7087da55e27e23e84b3","src/error.rs":"0101b991fe689fd2b20c3144e3cfcca3a6628c6892f1ced4c2ba84d6788d72c9","src/lib.rs":"7476a1feb706595867f6e01e16113e167e03420344708c1a0b3a455549c5f82c","src/parser.rs":"9fe5c4114dad22631e63fd1afa832b2c0ed3b4b28f04587dd2148956ced98768","tests/lib.rs":"d7881ad1388e4c907d5392429927d299042dbd5eaaacfd27cef9e1d692fd5aee"},"package":"28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f"} \ No newline at end of file
diff --git a/vendor/const-oid/CHANGELOG.md b/vendor/const-oid/CHANGELOG.md
index f6ea7d301..d6e604dfd 100644
--- a/vendor/const-oid/CHANGELOG.md
+++ b/vendor/const-oid/CHANGELOG.md
@@ -4,6 +4,30 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## 0.9.5 (2023-08-02)
+### Added
+- rfc8410 (curve25519) OIDS. ([#867])
+
+[#867]: https://github.com/RustCrypto/formats/pull/867
+
+## 0.9.4 (2023-07-10)
+### Added
+- rfc8894 (SCEP) OIDs. ([#1114])
+
+[#1114]: https://github.com/RustCrypto/formats/pull/1114
+
+## 0.9.3 (2023-06-29)
+### Added
+- `Database::find_names_for_oid` ([#1129])
+
+[#1129]: https://github.com/RustCrypto/formats/pull/1129
+
+## 0.9.2 (2023-02-26)
+### Added
+- Implement `Arbitrary` trait ([#761])
+
+[#761]: https://github.com/RustCrypto/formats/pull/761
+
## 0.9.1 (2022-11-12)
### Added
- clippy lints for checked arithmetic and panics ([#561])
diff --git a/vendor/const-oid/Cargo.toml b/vendor/const-oid/Cargo.toml
index 8c4dbfb0b..c6f6f308e 100644
--- a/vendor/const-oid/Cargo.toml
+++ b/vendor/const-oid/Cargo.toml
@@ -13,7 +13,7 @@
edition = "2021"
rust-version = "1.57"
name = "const-oid"
-version = "0.9.2"
+version = "0.9.5"
authors = ["RustCrypto Developers"]
description = """
Const-friendly implementation of the ISO/IEC Object Identifier (OID) standard
diff --git a/vendor/const-oid/src/db.rs b/vendor/const-oid/src/db.rs
index 971990de0..e4b7a47b4 100644
--- a/vendor/const-oid/src/db.rs
+++ b/vendor/const-oid/src/db.rs
@@ -54,6 +54,7 @@ const fn eq_case(lhs: &[u8], rhs: &[u8]) -> bool {
}
/// A query interface for OIDs/Names.
+#[derive(Copy, Clone)]
pub struct Database<'a>(&'a [(&'a ObjectIdentifier, &'a str)]);
impl<'a> Database<'a> {
@@ -99,6 +100,43 @@ impl<'a> Database<'a> {
None
}
+
+ /// Return the list of matched name for the OID.
+ pub const fn find_names_for_oid(&self, oid: ObjectIdentifier) -> Names<'a> {
+ Names {
+ database: *self,
+ oid,
+ position: 0,
+ }
+ }
+}
+
+/// Iterator returning the multiple names that may be associated with an OID.
+pub struct Names<'a> {
+ database: Database<'a>,
+ oid: ObjectIdentifier,
+ position: usize,
+}
+
+impl<'a> Iterator for Names<'a> {
+ type Item = &'a str;
+
+ fn next(&mut self) -> Option<&'a str> {
+ let mut i = self.position;
+
+ while i < self.database.0.len() {
+ let lhs = self.database.0[i].0;
+
+ if lhs.as_bytes().eq(self.oid.as_bytes()) {
+ self.position = i + 1;
+ return Some(self.database.0[i].1);
+ }
+
+ i += 1;
+ }
+
+ None
+ }
}
#[cfg(test)]
diff --git a/vendor/const-oid/src/db/gen.rs b/vendor/const-oid/src/db/gen.rs
index 74945a494..fbeb5dce0 100644
--- a/vendor/const-oid/src/db/gen.rs
+++ b/vendor/const-oid/src/db/gen.rs
@@ -2245,6 +2245,38 @@ 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 rfc8410 {
+ pub const ID_EDWARDS_CURVE_ALGS: crate::ObjectIdentifier =
+ crate::ObjectIdentifier::new_unwrap("1.3.101");
+ pub const ID_X_25519: crate::ObjectIdentifier =
+ crate::ObjectIdentifier::new_unwrap("1.3.101.110");
+ pub const ID_X_448: crate::ObjectIdentifier =
+ crate::ObjectIdentifier::new_unwrap("1.3.101.111");
+ pub const ID_ED_25519: crate::ObjectIdentifier =
+ crate::ObjectIdentifier::new_unwrap("1.3.101.112");
+ pub const ID_ED_448: crate::ObjectIdentifier =
+ crate::ObjectIdentifier::new_unwrap("1.3.101.113");
+}
+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 +4217,18 @@ pub const DB: super::Database<'static> = super::Database(&[
),
(&rfc8284::JID_OBJECT, "JIDObject"),
(&rfc8284::JID, "jid"),
+ (&rfc8410::ID_EDWARDS_CURVE_ALGS, "id-edwards-curve-algs"),
+ (&rfc8410::ID_X_25519, "id-X25519"),
+ (&rfc8410::ID_X_448, "id-X448"),
+ (&rfc8410::ID_ED_25519, "id-Ed25519"),
+ (&rfc8410::ID_ED_448, "id-Ed448"),
+ (&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"),
]);