winhttp/tests: Show that WINHTTP_OPTION_SECURE_PROTOCOLS can't be set on connection handles.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48254 Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
65200440fd
commit
2c708d8d9c
|
@ -1070,6 +1070,13 @@ static void test_secure_connection(void)
|
|||
con = WinHttpConnect(ses, test_winehq, 443, 0);
|
||||
ok(con != NULL, "failed to open a connection %u\n", GetLastError());
|
||||
|
||||
SetLastError( 0xdeadbeef );
|
||||
protocols = WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2;
|
||||
ret = WinHttpSetOption(con, WINHTTP_OPTION_SECURE_PROTOCOLS, &protocols, sizeof(protocols));
|
||||
err = GetLastError();
|
||||
ok(!ret, "unexpected success\n");
|
||||
ok(err == ERROR_WINHTTP_INCORRECT_HANDLE_TYPE, "got %u\n", err);
|
||||
|
||||
/* try without setting WINHTTP_FLAG_SECURE */
|
||||
req = WinHttpOpenRequest(con, NULL, NULL, NULL, NULL, NULL, 0);
|
||||
ok(req != NULL, "failed to open a request %u\n", GetLastError());
|
||||
|
|
Loading…
Reference in New Issue