]> git.proxmox.com Git - libgit2.git/commitdiff
http: correct the expected error for RC4
authorCarlos Martín Nieto <cmn@dwim.me>
Mon, 9 Jan 2017 17:50:17 +0000 (17:50 +0000)
committerCarlos Martín Nieto <cmn@dwim.me>
Mon, 9 Jan 2017 17:58:58 +0000 (17:58 +0000)
We must make sure that we're getting a certificate error from the
library so we know that we're testing the right thing.

tests/online/badssl.c

index f3470f6d705e8da846e4865fe7bc0985511e2a5f..6dacc18b63ed6a6c83bdf07e902c26f605e929b9 100644 (file)
@@ -70,6 +70,8 @@ void test_online_badssl__old_cipher(void)
        if (!g_has_ssl)
                cl_skip();
 
-       cl_git_fail(git_clone(&g_repo, "https://rc4.badssl.com/fake.git", "./fake", NULL));
-       cl_git_fail(git_clone(&g_repo, "https://rc4.badssl.com/fake.git", "./fake", &opts));
+       cl_git_fail_with(GIT_ECERTIFICATE,
+                        git_clone(&g_repo, "https://rc4.badssl.com/fake.git", "./fake", NULL));
+       cl_git_fail_with(GIT_ECERTIFICATE,
+                        git_clone(&g_repo, "https://rc4.badssl.com/fake.git", "./fake", &opts));
 }