mirror of
				https://github.com/Telecominfraproject/wlan-cloud-lib-poco.git
				synced 2025-10-31 02:27:56 +00:00 
			
		
		
		
	fixed GH #1303: HTTPSClientSession::sendRequest() fails if server has wildcard cert
This commit is contained in:
		| @@ -64,8 +64,6 @@ HTTPSClientSession::HTTPSClientSession(const std::string& host, Poco::UInt16 por | |||||||
| { | { | ||||||
| 	setHost(host); | 	setHost(host); | ||||||
| 	setPort(port); | 	setPort(port); | ||||||
| 	SecureStreamSocket sss(socket()); |  | ||||||
| 	sss.setPeerHostName(host); |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -90,8 +88,6 @@ HTTPSClientSession::HTTPSClientSession(const std::string& host, Poco::UInt16 por | |||||||
| { | { | ||||||
| 	setHost(host); | 	setHost(host); | ||||||
| 	setPort(port); | 	setPort(port); | ||||||
| 	SecureStreamSocket sss(socket()); |  | ||||||
| 	sss.setPeerHostName(host); |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -102,8 +98,6 @@ HTTPSClientSession::HTTPSClientSession(const std::string& host, Poco::UInt16 por | |||||||
| { | { | ||||||
| 	setHost(host); | 	setHost(host); | ||||||
| 	setPort(port); | 	setPort(port); | ||||||
| 	SecureStreamSocket sss(socket()); |  | ||||||
| 	sss.setPeerHostName(host); |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -148,6 +142,10 @@ void HTTPSClientSession::connect(const SocketAddress& address) | |||||||
| 	if (getProxyHost().empty() || bypassProxy()) | 	if (getProxyHost().empty() || bypassProxy()) | ||||||
| 	{ | 	{ | ||||||
| 		SecureStreamSocket sss(socket()); | 		SecureStreamSocket sss(socket()); | ||||||
|  | 		if (sss.getPeerHostName().empty())  | ||||||
|  | 		{ | ||||||
|  | 			sss.setPeerHostName(getHost()); | ||||||
|  | 		} | ||||||
| 		if (_pContext->sessionCacheEnabled()) | 		if (_pContext->sessionCacheEnabled()) | ||||||
| 		{ | 		{ | ||||||
| 			sss.useSession(_pSession); | 			sss.useSession(_pSession); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Guenter Obiltschnig
					Guenter Obiltschnig