diff options
Diffstat (limited to 'openssl/src/ssl')
| -rw-r--r-- | openssl/src/ssl/connector.rs | 10 |
1 files changed, 5 insertions, 5 deletions
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, |