diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2014-08-30 00:40:37 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-09-16 17:01:31 +0200 |
commit | 08545d366b24186631b08e3c232f35222d9de5ea (patch) | |
tree | c7de24db595e433397a95957d30672daca96b80b /tests/online | |
parent | 23ca0ad5ebcba3173ba3ff51e8114c33f795e62a (diff) | |
download | libgit2-08545d366b24186631b08e3c232f35222d9de5ea.tar.gz |
winhttp: credential check on successful connect
On successful connection, still ask the user whether they accept the server's certificate, indicating that WinHTTP would let it though.
Diffstat (limited to 'tests/online')
-rw-r--r-- | tests/online/clone.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/online/clone.c b/tests/online/clone.c index a880d47d9..cebe3b2ba 100644 --- a/tests/online/clone.c +++ b/tests/online/clone.c @@ -485,11 +485,13 @@ void test_online_clone__certificate_invalid(void) { g_options.remote_callbacks.certificate_check = fail_certificate_check; - cl_git_fail_with(git_clone(&g_repo, "http://github.com/libgit2/TestGitRepository", "./foo", &g_options), + cl_git_fail_with(git_clone(&g_repo, "https://github.com/libgit2/TestGitRepository", "./foo", &g_options), GIT_ECERTIFICATE); +#ifdef GIT_SSH cl_git_fail_with(git_clone(&g_repo, "ssh://github.com/libgit2/TestGitRepository", "./foo", &g_options), GIT_ECERTIFICATE); +#endif } static int succeed_certificate_check(git_cert_t type, void *data, size_t len, int valid, void *payload) @@ -507,5 +509,5 @@ void test_online_clone__certificate_valid(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)); + cl_git_pass(git_clone(&g_repo, "https://github.com/libgit2/TestGitRepository", "./foo", &g_options)); } |