mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-09 11:18:16 +00:00
winhttp: only do certificate check for SSL
If we're not using SSL, don't call the user's certificate check callback.
This commit is contained in:
parent
08545d366b
commit
5f2cf732ab
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user