summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2015-03-16 19:39:05 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2015-03-16 19:39:05 +0100
commit29e7ae5d81c1615fbcde78d7fbf44856059d9b99 (patch)
tree4d49bfacd9dfb888ef817d510efa3b1da0f175cb
parentd675982a15388d8c413acda139b4662062cf3286 (diff)
downloadlibgit2-29e7ae5d81c1615fbcde78d7fbf44856059d9b99.tar.gz
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.
-rw-r--r--tests/online/clone.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/online/clone.c b/tests/online/clone.c
index 3bb927955..4fdeee1d2 100644
--- a/tests/online/clone.c
+++ b/tests/online/clone.c
@@ -565,3 +565,10 @@ void test_online_clone__certificate_valid(void)
cl_git_pass(git_clone(&g_repo, "https://github.com/libgit2/TestGitRepository", "./foo", &g_options));
}
+
+void test_online_clone__start_with_http(void)
+{
+ g_options.remote_callbacks.certificate_check = succeed_certificate_check;
+
+ cl_git_pass(git_clone(&g_repo, "http://github.com/libgit2/TestGitRepository", "./foo", &g_options));
+}