properly version library functions

This commit is contained in:
Benjamin Fry 2017-03-19 00:55:42 -07:00 committed by Bastian Köcher
parent 3595ff9e51
commit 847fac25f8
2 changed files with 8 additions and 0 deletions

View File

@ -86,6 +86,13 @@ impl X509StoreContextRef {
} }
} }
#[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
pub fn verify_cert(self) -> Result<Option<X509VerifyError>, ErrorStack> {
unsafe {
cvt(ffi::X509_verify_cert(self.as_ptr())).map(|_| ())
}
}
/// Returns the error code of the context. /// Returns the error code of the context.
/// ///
/// This corresponds to [`X509_STORE_CTX_get_error`]. /// This corresponds to [`X509_STORE_CTX_get_error`].

View File

@ -285,6 +285,7 @@ fn signature() {
assert_eq!(algorithm.object().to_string(), "sha256WithRSAEncryption"); assert_eq!(algorithm.object().to_string(), "sha256WithRSAEncryption");
} }
#[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
#[test] #[test]
fn clone_x509() { fn clone_x509() {
let cert = include_bytes!("../../test/cert.pem"); let cert = include_bytes!("../../test/cert.pem");