mirror of
https://github.com/yhirose/cpp-httplib
synced 2024-11-21 14:29:10 -07:00
Fix #210
This commit is contained in:
parent
22615f9682
commit
bdbfc6cfe7
1 changed files with 2 additions and 0 deletions
|
@ -3252,6 +3252,7 @@ SSLClient::verify_host_with_subject_alt_name(X509 *server_cert) const {
|
|||
struct in_addr addr;
|
||||
size_t addr_len = 0;
|
||||
|
||||
#ifndef __MINGW32__
|
||||
if (inet_pton(AF_INET6, host_.c_str(), &addr6)) {
|
||||
type = GEN_IPADD;
|
||||
addr_len = sizeof(struct in6_addr);
|
||||
|
@ -3259,6 +3260,7 @@ SSLClient::verify_host_with_subject_alt_name(X509 *server_cert) const {
|
|||
type = GEN_IPADD;
|
||||
addr_len = sizeof(struct in_addr);
|
||||
}
|
||||
#endif
|
||||
|
||||
auto alt_names = static_cast<const struct stack_st_GENERAL_NAME *>(
|
||||
X509_get_ext_d2i(server_cert, NID_subject_alt_name, nullptr, nullptr));
|
||||
|
|
Loading…
Reference in a new issue