get_error -> error

This commit is contained in:
Steven Fackler 2016-08-07 21:34:58 -07:00
parent a0a6c03d74
commit 79602b6af4
2 changed files with 3 additions and 3 deletions

View File

@ -310,7 +310,7 @@ run_test!(verify_callback_load_certs, |method, stream| {
run_test!(verify_trusted_get_error_ok, |method, stream| {
let mut ctx = SslContext::new(method).unwrap();
ctx.set_verify_callback(SSL_VERIFY_PEER, |_, x509_ctx| {
assert!(x509_ctx.get_error().is_none());
assert!(x509_ctx.error().is_none());
true
});
@ -324,7 +324,7 @@ run_test!(verify_trusted_get_error_ok, |method, stream| {
run_test!(verify_trusted_get_error_err, |method, stream| {
let mut ctx = SslContext::new(method).unwrap();
ctx.set_verify_callback(SSL_VERIFY_PEER, |_, x509_ctx| {
assert!(x509_ctx.get_error().is_some());
assert!(x509_ctx.error().is_some());
false
});

View File

@ -83,7 +83,7 @@ impl X509StoreContext {
X509StoreContext { ctx: ctx }
}
pub fn get_error(&self) -> Option<X509ValidationError> {
pub fn error(&self) -> Option<X509ValidationError> {
let err = unsafe { ffi::X509_STORE_CTX_get_error(self.ctx) };
X509ValidationError::from_raw(err)
}