Skip to content

Commit 29e7ae5

Browse files
committed
Add failing test for cert callback with non-ecrypted stream
When we have an HTTP stream and have set the certificatre check callback, we currently fail as we ask the unencrypted stream for its certificate.
1 parent d675982 commit 29e7ae5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/online/clone.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,3 +565,10 @@ void test_online_clone__certificate_valid(void)
565565

566566
cl_git_pass(git_clone(&g_repo, "https://github.com/libgit2/TestGitRepository", "./foo", &g_options));
567567
}
568+
569+
void test_online_clone__start_with_http(void)
570+
{
571+
g_options.remote_callbacks.certificate_check = succeed_certificate_check;
572+
573+
cl_git_pass(git_clone(&g_repo, "http://github.com/libgit2/TestGitRepository", "./foo", &g_options));
574+
}

0 commit comments

Comments
 (0)