diff --git a/src/rust/Cargo.lock b/src/rust/Cargo.lock index bd7e87764..4aed604ed 100644 --- a/src/rust/Cargo.lock +++ b/src/rust/Cargo.lock @@ -90,7 +90,7 @@ dependencies = [ "cryptography-cffi", "cryptography-openssl", "cryptography-x509", - "cryptography-x509-validation", + "cryptography-x509-verification", "foreign-types-shared", "once_cell", "openssl", @@ -108,7 +108,7 @@ dependencies = [ ] [[package]] -name = "cryptography-x509-validation" +name = "cryptography-x509-verification" version = "0.1.0" dependencies = [ "asn1", diff --git a/src/rust/Cargo.toml b/src/rust/Cargo.toml index eff129d57..13e35e298 100644 --- a/src/rust/Cargo.toml +++ b/src/rust/Cargo.toml @@ -14,7 +14,7 @@ pyo3 = { version = "0.20", features = ["abi3"] } asn1 = { version = "0.15.5", default-features = false } cryptography-cffi = { path = "cryptography-cffi" } cryptography-x509 = { path = "cryptography-x509" } -cryptography-x509-validation = { path = "cryptography-x509-validation" } +cryptography-x509-verification = { path = "cryptography-x509-verification" } cryptography-openssl = { path = "cryptography-openssl" } pem = { version = "3", default-features = false } openssl = "0.10.62" @@ -41,5 +41,5 @@ members = [ "cryptography-cffi", "cryptography-openssl", "cryptography-x509", - "cryptography-x509-validation", + "cryptography-x509-verification", ] diff --git a/src/rust/cryptography-x509-validation/Cargo.toml b/src/rust/cryptography-x509-verification/Cargo.toml similarity index 90% rename from src/rust/cryptography-x509-validation/Cargo.toml rename to src/rust/cryptography-x509-verification/Cargo.toml index 3e3a81555..1ed759074 100644 --- a/src/rust/cryptography-x509-validation/Cargo.toml +++ b/src/rust/cryptography-x509-verification/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "cryptography-x509-validation" +name = "cryptography-x509-verification" version = "0.1.0" authors = ["The cryptography developers "] edition = "2021" diff --git a/src/rust/cryptography-x509-validation/src/certificate.rs b/src/rust/cryptography-x509-verification/src/certificate.rs similarity index 100% rename from src/rust/cryptography-x509-validation/src/certificate.rs rename to src/rust/cryptography-x509-verification/src/certificate.rs diff --git a/src/rust/cryptography-x509-validation/src/lib.rs b/src/rust/cryptography-x509-verification/src/lib.rs similarity index 100% rename from src/rust/cryptography-x509-validation/src/lib.rs rename to src/rust/cryptography-x509-verification/src/lib.rs diff --git a/src/rust/cryptography-x509-validation/src/ops.rs b/src/rust/cryptography-x509-verification/src/ops.rs similarity index 100% rename from src/rust/cryptography-x509-validation/src/ops.rs rename to src/rust/cryptography-x509-verification/src/ops.rs diff --git a/src/rust/cryptography-x509-validation/src/policy/extension.rs b/src/rust/cryptography-x509-verification/src/policy/extension.rs similarity index 100% rename from src/rust/cryptography-x509-validation/src/policy/extension.rs rename to src/rust/cryptography-x509-verification/src/policy/extension.rs diff --git a/src/rust/cryptography-x509-validation/src/policy/mod.rs b/src/rust/cryptography-x509-verification/src/policy/mod.rs similarity index 100% rename from src/rust/cryptography-x509-validation/src/policy/mod.rs rename to src/rust/cryptography-x509-verification/src/policy/mod.rs diff --git a/src/rust/cryptography-x509-validation/src/trust_store.rs b/src/rust/cryptography-x509-verification/src/trust_store.rs similarity index 100% rename from src/rust/cryptography-x509-validation/src/trust_store.rs rename to src/rust/cryptography-x509-verification/src/trust_store.rs diff --git a/src/rust/cryptography-x509-validation/src/types.rs b/src/rust/cryptography-x509-verification/src/types.rs similarity index 98% rename from src/rust/cryptography-x509-validation/src/types.rs rename to src/rust/cryptography-x509-verification/src/types.rs index 2868c59cc..f56471521 100644 --- a/src/rust/cryptography-x509-validation/src/types.rs +++ b/src/rust/cryptography-x509-verification/src/types.rs @@ -17,7 +17,7 @@ use std::str::FromStr; /// [RFC 1123 2.1]: https://datatracker.ietf.org/doc/html/rfc1123#section-2.1 /// /// ```rust -/// # use cryptography_x509_validation::types::DNSName; +/// # use cryptography_x509_verification::types::DNSName; /// assert_eq!(DNSName::new("foo.com").unwrap(), DNSName::new("FOO.com").unwrap()); /// ``` #[derive(Clone, Debug)] @@ -59,7 +59,7 @@ impl<'a> DNSName<'a> { /// Return this `DNSName`'s parent domain, if it has one. /// /// ```rust - /// # use cryptography_x509_validation::types::DNSName; + /// # use cryptography_x509_verification::types::DNSName; /// let domain = DNSName::new("foo.example.com").unwrap(); /// assert_eq!(domain.parent().unwrap().as_str(), "example.com"); /// ``` @@ -136,7 +136,7 @@ impl<'a> DNSConstraint<'a> { /// side of the name satisfies the name constraint. /// /// ```rust - /// # use cryptography_x509_validation::types::{DNSConstraint, DNSName}; + /// # use cryptography_x509_verification::types::{DNSConstraint, DNSName}; /// let example_com = DNSName::new("example.com").unwrap(); /// let badexample_com = DNSName::new("badexample.com").unwrap(); /// let foo_example_com = DNSName::new("foo.example.com").unwrap(); @@ -217,7 +217,7 @@ impl IPAddress { /// Returns a new `IPAddress` with the first `prefix` bits of the `IPAddress`. /// /// ```rust - /// # use cryptography_x509_validation::types::IPAddress; + /// # use cryptography_x509_verification::types::IPAddress; /// let ip = IPAddress::from_str("192.0.2.1").unwrap(); /// assert_eq!(ip.mask(24), IPAddress::from_str("192.0.2.0").unwrap()); /// ``` @@ -288,7 +288,7 @@ impl IPConstraint { /// Determines if the `addr` is within the `IPConstraint`. /// /// ```rust - /// # use cryptography_x509_validation::types::{IPAddress, IPConstraint}; + /// # use cryptography_x509_verification::types::{IPAddress, IPConstraint}; /// let range_bytes = b"\xc6\x33\x64\x00\xff\xff\xff\x00"; /// let range = IPConstraint::from_bytes(range_bytes).unwrap(); /// assert!(range.matches(&IPAddress::from_str("198.51.100.42").unwrap())); diff --git a/src/rust/src/x509/certificate.rs b/src/rust/src/x509/certificate.rs index 7753974ac..c2a46e0a1 100644 --- a/src/rust/src/x509/certificate.rs +++ b/src/rust/src/x509/certificate.rs @@ -21,7 +21,7 @@ use cryptography_x509::extensions::{ }; use cryptography_x509::extensions::{Extension, SubjectAlternativeName}; use cryptography_x509::{common, oid}; -use cryptography_x509_validation::ops::CryptoOps; +use cryptography_x509_verification::ops::CryptoOps; use pyo3::{IntoPy, ToPyObject}; use std::collections::hash_map::DefaultHasher; use std::hash::{Hash, Hasher}; diff --git a/src/rust/src/x509/verify.rs b/src/rust/src/x509/verify.rs index 4f05f152e..769814886 100644 --- a/src/rust/src/x509/verify.rs +++ b/src/rust/src/x509/verify.rs @@ -3,7 +3,7 @@ // for complete details. use cryptography_x509::certificate::Certificate; -use cryptography_x509_validation::{ +use cryptography_x509_verification::{ ops::CryptoOps, policy::{Policy, Subject}, trust_store::Store, @@ -120,7 +120,7 @@ impl PyServerVerifier { ); let policy = self.as_policy(); - let chain = cryptography_x509_validation::verify( + let chain = cryptography_x509_verification::verify( leaf.raw.borrow_dependent(), intermediates .iter()