Skip to content

Commit da0a4e8

Browse files
Merge pull request #8 from Aleksandr-Melnikov/fix_ignore_host_name
Fix ignore host name
2 parents 590c289 + d379fd2 commit da0a4e8

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

include/winhttppal.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,10 @@ enum
177177

178178
enum
179179
{
180-
SECURITY_FLAG_IGNORE_UNKNOWN_CA,
181-
SECURITY_FLAG_IGNORE_CERT_DATE_INVALID,
182-
SECURITY_FLAG_IGNORE_CERT_CN_INVALID,
183-
SECURITY_FLAG_IGNORE_CERT_WRONG_USAGE,
180+
SECURITY_FLAG_IGNORE_UNKNOWN_CA = 0x01,
181+
SECURITY_FLAG_IGNORE_CERT_DATE_INVALID = 0x02,
182+
SECURITY_FLAG_IGNORE_CERT_CN_INVALID = 0x04,
183+
SECURITY_FLAG_IGNORE_CERT_WRONG_USAGE = 0x10,
184184
};
185185
enum
186186
{

src/winhttppal.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2763,6 +2763,11 @@ BOOLAPI WinHttpSetOption(
27632763
request->VerifyPeer() = 0L;
27642764
request->VerifyHost() = 0L;
27652765
}
2766+
else if (value == SECURITY_FLAG_IGNORE_CERT_CN_INVALID)
2767+
{
2768+
request->VerifyPeer() = 1L;
2769+
request->VerifyHost() = 0L;
2770+
}
27662771
else if (!value)
27672772
{
27682773
request->VerifyPeer() = 1L;

0 commit comments

Comments
 (0)