diff --git a/Cargo.lock b/Cargo.lock index 64e09bc53..ea87b7a44 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -339,7 +339,7 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.10.0-pre.1" +version = "0.10.0-pre.2" dependencies = [ "arbitrary", "hex-literal 0.4.1", @@ -442,7 +442,7 @@ version = "0.8.0-pre" dependencies = [ "arbitrary", "bytes", - "const-oid 0.10.0-pre.1", + "const-oid 0.10.0-pre.2", "der_derive 0.8.0-pre", "flagset", "hex-literal 0.4.1", @@ -1008,7 +1008,7 @@ dependencies = [ name = "pkcs1" version = "0.8.0-pre" dependencies = [ - "const-oid 0.10.0-pre.1", + "const-oid 0.10.0-pre.2", "der 0.8.0-pre", "hex-literal 0.4.1", "pkcs8 0.11.0-pre", diff --git a/const-oid/Cargo.toml b/const-oid/Cargo.toml index 368bb6586..5ed2a4ef2 100644 --- a/const-oid/Cargo.toml +++ b/const-oid/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "const-oid" -version = "0.10.0-pre.1" +version = "0.10.0-pre.2" authors = ["RustCrypto Developers"] license = "Apache-2.0 OR MIT" description = """ diff --git a/const-oid/src/lib.rs b/const-oid/src/lib.rs index 9d137026d..fcee6c496 100644 --- a/const-oid/src/lib.rs +++ b/const-oid/src/lib.rs @@ -356,6 +356,14 @@ impl<'a, const MAX_SIZE: usize> From<&'a ObjectIdentifier> for &'a Obj } } +impl<'a> TryFrom<&'a [u8]> for &'a ObjectIdentifierRef { + type Error = Error; + + fn try_from(ber_bytes: &'a [u8]) -> Result { + ObjectIdentifierRef::from_bytes(ber_bytes) + } +} + impl fmt::Debug for ObjectIdentifierRef { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "ObjectIdentifierRef({})", self) diff --git a/der/Cargo.toml b/der/Cargo.toml index 72f79d39b..94dd0d4e8 100644 --- a/der/Cargo.toml +++ b/der/Cargo.toml @@ -18,7 +18,7 @@ rust-version = "1.71" [dependencies] arbitrary = { version = "1.3", features = ["derive"], optional = true } bytes = { version = "1", optional = true, default-features = false } -const-oid = { version = "=0.10.0-pre.1", optional = true } +const-oid = { version = "=0.10.0-pre.2", optional = true } der_derive = { version = "=0.8.0-pre", optional = true } flagset = { version = "0.4.4", optional = true } pem-rfc7468 = { version = "=1.0.0-pre", optional = true, features = ["alloc"] } diff --git a/pkcs1/Cargo.toml b/pkcs1/Cargo.toml index 0731a7fc9..101032338 100644 --- a/pkcs1/Cargo.toml +++ b/pkcs1/Cargo.toml @@ -22,7 +22,7 @@ spki = { version = "=0.8.0-pre" } pkcs8 = { version = "=0.11.0-pre", optional = true, default-features = false } [dev-dependencies] -const-oid = { version = "=0.10.0-pre.1", features = ["db"] } +const-oid = { version = "=0.10.0-pre.2", features = ["db"] } hex-literal = "0.4" tempfile = "3"