mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-07 20:17:59 +00:00
Add tests for host names
Signed-off-by: Sven Strickroth <email@cs-ware.de>
This commit is contained in:
parent
e6e834a129
commit
db3d169c33
@ -480,7 +480,6 @@ int ssh_certificate_check(git_cert *cert, int valid, const char *host, void *pay
|
|||||||
const char *expected_str;
|
const char *expected_str;
|
||||||
|
|
||||||
GIT_UNUSED(valid);
|
GIT_UNUSED(valid);
|
||||||
GIT_UNUSED(host);
|
|
||||||
GIT_UNUSED(payload);
|
GIT_UNUSED(payload);
|
||||||
|
|
||||||
expected_str = cl_getenv("GITTEST_REMOTE_SSH_FINGERPRINT");
|
expected_str = cl_getenv("GITTEST_REMOTE_SSH_FINGERPRINT");
|
||||||
@ -505,6 +504,8 @@ int ssh_certificate_check(git_cert *cert, int valid, const char *host, void *pay
|
|||||||
|
|
||||||
cl_assert(!memcmp(&expected, &actual, 20));
|
cl_assert(!memcmp(&expected, &actual, 20));
|
||||||
|
|
||||||
|
cl_assert_equal_s("localhost", host);
|
||||||
|
|
||||||
return GIT_EUSER;
|
return GIT_EUSER;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -551,9 +552,10 @@ static int succeed_certificate_check(git_cert *cert, int valid, const char *host
|
|||||||
{
|
{
|
||||||
GIT_UNUSED(cert);
|
GIT_UNUSED(cert);
|
||||||
GIT_UNUSED(valid);
|
GIT_UNUSED(valid);
|
||||||
GIT_UNUSED(host);
|
|
||||||
GIT_UNUSED(payload);
|
GIT_UNUSED(payload);
|
||||||
|
|
||||||
|
cl_assert_equal_s("github.com", host);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user