Loading openssl/src/x509/mod.rs +3 −3 Original line number Diff line number Diff line Loading @@ -480,7 +480,7 @@ impl X509Ref { /// Retrieves the path length extension from a certificate, if it exists. #[corresponds(X509_get_pathlen)] #[cfg(ossl110)] #[cfg(any(ossl110, boringssl))] pub fn pathlen(&self) -> Option<u32> { let v = unsafe { ffi::X509_get_pathlen(self.as_ptr()) }; u32::try_from(v).ok() Loading @@ -488,7 +488,7 @@ impl X509Ref { /// Returns this certificate's subject key id, if it exists. #[corresponds(X509_get0_subject_key_id)] #[cfg(ossl110)] #[cfg(any(ossl110, boringssl))] pub fn subject_key_id(&self) -> Option<&Asn1OctetStringRef> { unsafe { let data = ffi::X509_get0_subject_key_id(self.as_ptr()); Loading @@ -498,7 +498,7 @@ impl X509Ref { /// Returns this certificate's authority key id, if it exists. #[corresponds(X509_get0_authority_key_id)] #[cfg(ossl110)] #[cfg(any(ossl110, boringssl))] pub fn authority_key_id(&self) -> Option<&Asn1OctetStringRef> { unsafe { let data = ffi::X509_get0_authority_key_id(self.as_ptr()); Loading openssl/src/x509/tests.rs +3 −3 Original line number Diff line number Diff line Loading @@ -172,7 +172,7 @@ fn test_subject_alt_name() { } #[test] #[cfg(ossl110)] #[cfg(any(ossl110, boringssl))] fn test_retrieve_pathlen() { let cert = include_bytes!("../../test/root-ca.pem"); let cert = X509::from_pem(cert).unwrap(); Loading @@ -188,7 +188,7 @@ fn test_retrieve_pathlen() { } #[test] #[cfg(ossl110)] #[cfg(any(ossl110, boringssl))] fn test_subject_key_id() { let cert = include_bytes!("../../test/certv3.pem"); let cert = X509::from_pem(cert).unwrap(); Loading @@ -201,7 +201,7 @@ fn test_subject_key_id() { } #[test] #[cfg(ossl110)] #[cfg(any(ossl110, boringssl))] fn test_authority_key_id() { let cert = include_bytes!("../../test/certv3.pem"); let cert = X509::from_pem(cert).unwrap(); Loading Loading
openssl/src/x509/mod.rs +3 −3 Original line number Diff line number Diff line Loading @@ -480,7 +480,7 @@ impl X509Ref { /// Retrieves the path length extension from a certificate, if it exists. #[corresponds(X509_get_pathlen)] #[cfg(ossl110)] #[cfg(any(ossl110, boringssl))] pub fn pathlen(&self) -> Option<u32> { let v = unsafe { ffi::X509_get_pathlen(self.as_ptr()) }; u32::try_from(v).ok() Loading @@ -488,7 +488,7 @@ impl X509Ref { /// Returns this certificate's subject key id, if it exists. #[corresponds(X509_get0_subject_key_id)] #[cfg(ossl110)] #[cfg(any(ossl110, boringssl))] pub fn subject_key_id(&self) -> Option<&Asn1OctetStringRef> { unsafe { let data = ffi::X509_get0_subject_key_id(self.as_ptr()); Loading @@ -498,7 +498,7 @@ impl X509Ref { /// Returns this certificate's authority key id, if it exists. #[corresponds(X509_get0_authority_key_id)] #[cfg(ossl110)] #[cfg(any(ossl110, boringssl))] pub fn authority_key_id(&self) -> Option<&Asn1OctetStringRef> { unsafe { let data = ffi::X509_get0_authority_key_id(self.as_ptr()); Loading
openssl/src/x509/tests.rs +3 −3 Original line number Diff line number Diff line Loading @@ -172,7 +172,7 @@ fn test_subject_alt_name() { } #[test] #[cfg(ossl110)] #[cfg(any(ossl110, boringssl))] fn test_retrieve_pathlen() { let cert = include_bytes!("../../test/root-ca.pem"); let cert = X509::from_pem(cert).unwrap(); Loading @@ -188,7 +188,7 @@ fn test_retrieve_pathlen() { } #[test] #[cfg(ossl110)] #[cfg(any(ossl110, boringssl))] fn test_subject_key_id() { let cert = include_bytes!("../../test/certv3.pem"); let cert = X509::from_pem(cert).unwrap(); Loading @@ -201,7 +201,7 @@ fn test_subject_key_id() { } #[test] #[cfg(ossl110)] #[cfg(any(ossl110, boringssl))] fn test_authority_key_id() { let cert = include_bytes!("../../test/certv3.pem"); let cert = X509::from_pem(cert).unwrap(); Loading