Skip to content

Commit

Permalink
fixes for other configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
HolyShitMan committed May 17, 2024
1 parent 057ca34 commit 29e4cce
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions openssl/src/ssl/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,9 @@ cfg_if! {

fn verify_hostname(domain: &str, cert: &X509Ref) -> bool {
match cert.subject_alt_names() {
Some(names) => verify_subject_alt_names(domain, names),
None => verify_subject_name(domain, &cert.subject_name()),
Ok(names) => verify_subject_alt_names(domain, names),
Err(X509D2iError::extension_not_found_error) => verify_subject_name(domain, &cert.subject_name()),
Err(e) => panic!("Error when fetching alt names from certificate: {}", e),
}
}

Expand Down

0 comments on commit 29e4cce

Please sign in to comment.