Commit 5f2cf732 by Carlos Martín Nieto

winhttp: only do certificate check for SSL

If we're not using SSL, don't call the user's certificate check callback.
parent 08545d36
......@@ -212,7 +212,7 @@ static int certificate_check(winhttp_stream *s, int valid)
PCERT_CONTEXT cert_ctx;
DWORD cert_ctx_size = sizeof(cert_ctx);
if (t->owner->certificate_check_cb == NULL)
if (t->owner->certificate_check_cb == NULL || !t->connection_data.use_ssl)
return 0;
if (!WinHttpQueryOption(s->request, WINHTTP_OPTION_SERVER_CERT_CONTEXT, &cert_ctx, &cert_ctx_size)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment