From f9866cd44f69cda8fecf427bd5bd0c63a4e9b0cf Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Tue, 26 Dec 2017 14:53:35 -0700 Subject: Split X509StoreContextRef::ssl up --- openssl/src/ssl/connector.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'openssl/src/ssl') diff --git a/openssl/src/ssl/connector.rs b/openssl/src/ssl/connector.rs index 0c5d0df0..fb9a42e8 100644 --- a/openssl/src/ssl/connector.rs +++ b/openssl/src/ssl/connector.rs @@ -319,7 +319,8 @@ mod verify { use ex_data::Index; use nid::Nid; - use x509::{GeneralName, X509NameRef, X509Ref, X509StoreContextRef, X509VerifyResult}; + use x509::{GeneralName, X509NameRef, X509Ref, X509StoreContext, X509StoreContextRef, + X509VerifyResult}; use stack::Stack; use ssl::Ssl; @@ -334,11 +335,10 @@ mod verify { let ok = match ( x509_ctx.current_cert(), - x509_ctx - .ssl() + X509StoreContext::ssl_idx() .ok() - .and_then(|s| s) - .and_then(|s| s.ex_data(*HOSTNAME_IDX)), + .and_then(|idx| x509_ctx.ex_data(idx)) + .and_then(|ssl| ssl.ex_data(*HOSTNAME_IDX)), ) { (Some(x509), Some(domain)) => verify_hostname(domain, &x509), _ => true, -- cgit v1.2.3