[PATCH] Add some more schannel tests
Hans Leidekker
hans at codeweavers.com
Tue Sep 7 14:37:44 CDT 2010
> @@ -116,6 +128,10 @@ static void InitFunctionPtrs(void)
> if(!secdll)
> secdll = LoadLibraryA("security.dll");
> advapi32dll = GetModuleHandleA("advapi32.dll");
> + wsockdll = LoadLibraryA("ws2_32.dll");
> +
> + if(!wsockdll)
> + printf("Couldn't open ws2_32.dll\n");
>
Why are you loading ws2_32 dynamically?
> + desc->pBuffers[0].cbBuffer = size;
> + desc->pBuffers[0].pvBuffer = malloc(size);
Use HeapAlloc/Free instead of malloc/free.
> +static int receive_data(SOCKET sock, SecBuffer *buf)
> +{
> + unsigned received = 0;
> +
> + while(1)
> + {
> + unsigned char *data = buf->pvBuffer;
> + unsigned expected = 0;
> + int ret;
Please stick to 4 space indentation like the rest of the file.
> + addr.sin_family = AF_INET;
> + addr.sin_addr.s_addr = htonl(0xD1558712);
> + addr.sin_port = htons(443);
> + ret = pconnect(sock, (struct sockaddr *)&addr, sizeof(struct sockaddr_in));
> + if(ret==SOCKET_ERROR)
> + {
> + skip("Can't connect to mail.google.com\n");
> + return;
> + }
You should properly resolve mail.google.com.
More information about the wine-devel
mailing list