wiki:Linux/Wine/Bug16831

Bug  #16831 NETCON_secure_connect SSL_connect failed

See Winehq  bug #16831 NETCON_secure_connect SSL_connect failed for patches to fix this issue.

Test Suite Results

When run on Linux, dos2unix was used to process the output written to file. To run the test, pass a valid domain name and optionally a path. It will test permutations of protocol (HTTP & HTTPS), port (default, 80, 443), and INTERNET_FLAG_SECURE. For example:

./test-url.exe www.audible.com | dos2unix >test-url.wine.txt

On Windows:

test-url www.audible.com >test-url.xp.txt

Summary

Twelve permutations were tested. The details are below in the logs. This summary shows the end results with each variation of platform.

TestWine v1.1.12Wine v1.1.12 + patchWindows XP SP2
HTTP:defaultSuccessSuccessSuccess
HTTP:default+SECUREError 12157SuccessSuccess
HTTP:80SuccessSuccessSuccess
HTTP:80+SECUREError 12157Error 12157Error 12157
HTTP:443Error 12150Error 12150Error 12152
HTTP:443+SECURESuccessSuccessSuccess
HTTPS:defaultSuccessSuccessSuccess
HTTPS:default+SECURESuccessSuccessSuccess
HTTPS:80Error 12157Error 12157Error 12157
HTTPS:80+SECUREError 12157Error 12157Error 12157
HTTPS:443SuccessSuccessSuccess
HTTPS:443+SECURESuccessSuccessSuccess

Wine 1.1.12

Test various (secure) URL permutations with InternetCrackUrlW()
Version: 1.0.0
Domain: www.audible.com
Path: (null)
Internet connection handle: 1
Testing URL http://www.audible.com 
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = http
  urlComponents.nScheme 	 = 3
  urlComponents.nPort 		 = 80
 Success. URL handle: 3
Testing URL http://www.audible.com  (with INTERNET_FLAG_SECURE)
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = http
  urlComponents.nScheme 	 = 3
  urlComponents.nPort 		 = 80
 Error: number: 12157
Testing URL http://www.audible.com:80 
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = http
  urlComponents.nScheme 	 = 3
  urlComponents.nPort 		 = 80
 Success. URL handle: 5
Testing URL http://www.audible.com:80  (with INTERNET_FLAG_SECURE)
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = http
  urlComponents.nScheme 	 = 3
  urlComponents.nPort 		 = 80
 Error: number: 12157
Testing URL http://www.audible.com:443 
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = http
  urlComponents.nScheme 	 = 3
  urlComponents.nPort 		 = 443
 Error: number: 12150
Testing URL http://www.audible.com:443  (with INTERNET_FLAG_SECURE)
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = http
  urlComponents.nScheme 	 = 3
  urlComponents.nPort 		 = 443
 Success. URL handle: 8
Testing URL https://www.audible.com 
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = https
  urlComponents.nScheme 	 = 4
  urlComponents.nPort 		 = 443
 Success. URL handle: 9
Testing URL https://www.audible.com  (with INTERNET_FLAG_SECURE)
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = https
  urlComponents.nScheme 	 = 4
  urlComponents.nPort 		 = 443
 Success. URL handle: 10
Testing URL https://www.audible.com:80 
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = https
  urlComponents.nScheme 	 = 4
  urlComponents.nPort 		 = 80
 Error: number: 12157
Testing URL https://www.audible.com:80  (with INTERNET_FLAG_SECURE)
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = https
  urlComponents.nScheme 	 = 4
  urlComponents.nPort 		 = 80
 Error: number: 12157
Testing URL https://www.audible.com:443 
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = https
  urlComponents.nScheme 	 = 4
  urlComponents.nPort 		 = 443
 Success. URL handle: 13
Testing URL https://www.audible.com:443  (with INTERNET_FLAG_SECURE)
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = https
  urlComponents.nScheme 	 = 4
  urlComponents.nPort 		 = 443
 Success. URL handle: 14
Finished.

Wine 1.1.12 + patch

Test various (secure) URL permutations with InternetCrackUrlW()
Version: 1.0.0
Domain: www.audible.com
Path: (null)
Internet connection handle: 1
Testing URL http://www.audible.com 
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = http
  urlComponents.nScheme 	 = 3
  urlComponents.nPort 		 = 80
 Success. URL handle: 3
Testing URL http://www.audible.com  (with INTERNET_FLAG_SECURE)
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = http
  urlComponents.nScheme 	 = 3
  urlComponents.nPort 		 = 80
 Success. URL handle: 4
Testing URL http://www.audible.com:80 
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = http
  urlComponents.nScheme 	 = 3
  urlComponents.nPort 		 = 80
 Success. URL handle: 5
Testing URL http://www.audible.com:80  (with INTERNET_FLAG_SECURE)
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = http
  urlComponents.nScheme 	 = 3
  urlComponents.nPort 		 = 80
 Error: number: 12157
Testing URL http://www.audible.com:443 
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = http
  urlComponents.nScheme 	 = 3
  urlComponents.nPort 		 = 443
 Error: number: 12150
Testing URL http://www.audible.com:443  (with INTERNET_FLAG_SECURE)
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = http
  urlComponents.nScheme 	 = 3
  urlComponents.nPort 		 = 443
 Success. URL handle: 8
Testing URL https://www.audible.com 
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = https
  urlComponents.nScheme 	 = 4
  urlComponents.nPort 		 = 443
 Success. URL handle: 9
Testing URL https://www.audible.com  (with INTERNET_FLAG_SECURE)
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = https
  urlComponents.nScheme 	 = 4
  urlComponents.nPort 		 = 443
 Success. URL handle: 10
Testing URL https://www.audible.com:80 
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = https
  urlComponents.nScheme 	 = 4
  urlComponents.nPort 		 = 80
 Error: number: 12157
Testing URL https://www.audible.com:80  (with INTERNET_FLAG_SECURE)
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = https
  urlComponents.nScheme 	 = 4
  urlComponents.nPort 		 = 80
 Error: number: 12157
Testing URL https://www.audible.com:443 
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = https
  urlComponents.nScheme 	 = 4
  urlComponents.nPort 		 = 443
 Success. URL handle: 13
Testing URL https://www.audible.com:443  (with INTERNET_FLAG_SECURE)
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = https
  urlComponents.nScheme 	 = 4
  urlComponents.nPort 		 = 443
 Success. URL handle: 14
Finished.

Windows XP SP2

Test various (secure) URL permutations with InternetCrackUrlW()
Version: 1.0.0
Domain: www.audible.com
Path: (null)
Internet connection handle: 13369348
Testing URL http://www.audible.com 
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = http
  urlComponents.nScheme 	 = 3
  urlComponents.nPort 		 = 80
 Success. URL handle: 13369356
Testing URL http://www.audible.com  (with INTERNET_FLAG_SECURE)
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = http
  urlComponents.nScheme 	 = 3
  urlComponents.nPort 		 = 80
 Success. URL handle: 13369356
Testing URL http://www.audible.com:80 
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = http
  urlComponents.nScheme 	 = 3
  urlComponents.nPort 		 = 80
 Success. URL handle: 13369356
Testing URL http://www.audible.com:80  (with INTERNET_FLAG_SECURE)
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = http
  urlComponents.nScheme 	 = 3
  urlComponents.nPort 		 = 80
 Error: number: 12157
Testing URL http://www.audible.com:443 
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = http
  urlComponents.nScheme 	 = 3
  urlComponents.nPort 		 = 443
 Error: number: 12152
Testing URL http://www.audible.com:443  (with INTERNET_FLAG_SECURE)
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = http
  urlComponents.nScheme 	 = 3
  urlComponents.nPort 		 = 443
 Success. URL handle: 13369356
Testing URL https://www.audible.com 
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = https
  urlComponents.nScheme 	 = 4
  urlComponents.nPort 		 = 443
 Success. URL handle: 13369356
Testing URL https://www.audible.com  (with INTERNET_FLAG_SECURE)
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = https
  urlComponents.nScheme 	 = 4
  urlComponents.nPort 		 = 443
 Success. URL handle: 13369356
Testing URL https://www.audible.com:80 
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = https
  urlComponents.nScheme 	 = 4
  urlComponents.nPort 		 = 80
 Error: number: 12157
Testing URL https://www.audible.com:80  (with INTERNET_FLAG_SECURE)
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = https
  urlComponents.nScheme 	 = 4
  urlComponents.nPort 		 = 80
 Error: number: 12157
Testing URL https://www.audible.com:443 
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = https
  urlComponents.nScheme 	 = 4
  urlComponents.nPort 		 = 443
 Success. URL handle: 13369356
Testing URL https://www.audible.com:443  (with INTERNET_FLAG_SECURE)
 InternetCrackUrlW() reports:
  urlComponents.lpszScheme 	 = https
  urlComponents.nScheme 	 = 4
  urlComponents.nPort 		 = 443
 Success. URL handle: 13369356
Finished.

Test Program

The test program is attached Download. It compiles on Linux using mingw and runs on either Linux + wine or Windows (NT/win32 versions). It is built using:

i586-mingw32msvc-gcc -o test-url.exe test-url.c -lwininet -lshlwapi

Attachments