mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-10 09:43:51 +00:00
Fix #210
This commit is contained in:
parent
22615f9682
commit
bdbfc6cfe7
@ -3252,6 +3252,7 @@ SSLClient::verify_host_with_subject_alt_name(X509 *server_cert) const {
|
|||||||
struct in_addr addr;
|
struct in_addr addr;
|
||||||
size_t addr_len = 0;
|
size_t addr_len = 0;
|
||||||
|
|
||||||
|
#ifndef __MINGW32__
|
||||||
if (inet_pton(AF_INET6, host_.c_str(), &addr6)) {
|
if (inet_pton(AF_INET6, host_.c_str(), &addr6)) {
|
||||||
type = GEN_IPADD;
|
type = GEN_IPADD;
|
||||||
addr_len = sizeof(struct in6_addr);
|
addr_len = sizeof(struct in6_addr);
|
||||||
@ -3259,6 +3260,7 @@ SSLClient::verify_host_with_subject_alt_name(X509 *server_cert) const {
|
|||||||
type = GEN_IPADD;
|
type = GEN_IPADD;
|
||||||
addr_len = sizeof(struct in_addr);
|
addr_len = sizeof(struct in_addr);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
auto alt_names = static_cast<const struct stack_st_GENERAL_NAME *>(
|
auto alt_names = static_cast<const struct stack_st_GENERAL_NAME *>(
|
||||||
X509_get_ext_d2i(server_cert, NID_subject_alt_name, nullptr, nullptr));
|
X509_get_ext_d2i(server_cert, NID_subject_alt_name, nullptr, nullptr));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user