mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-31 00:03:07 +03:00
tests: Test vectors for related documentation
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@ -1127,6 +1127,9 @@ static void torture_ssh_check_hostname_syntax(void **state)
|
||||
assert_int_equal(rc, SSH_OK);
|
||||
rc = ssh_check_hostname_syntax("libssh.");
|
||||
assert_int_equal(rc, SSH_OK);
|
||||
// IDN
|
||||
rc = ssh_check_hostname_syntax("xn--bcher-kva.tld");
|
||||
assert_int_equal(rc, SSH_OK);
|
||||
|
||||
rc = ssh_check_hostname_syntax(NULL);
|
||||
assert_int_equal(rc, SSH_ERROR);
|
||||
@ -1170,6 +1173,9 @@ static void torture_ssh_check_hostname_syntax(void **state)
|
||||
assert_int_equal(rc, SSH_ERROR);
|
||||
rc = ssh_check_hostname_syntax("..");
|
||||
assert_int_equal(rc, SSH_ERROR);
|
||||
// IDN non-encoded
|
||||
rc = ssh_check_hostname_syntax("bücher.tld");
|
||||
assert_int_equal(rc, SSH_ERROR);
|
||||
}
|
||||
|
||||
static void torture_ssh_check_username_syntax(void **state) {
|
||||
|
Reference in New Issue
Block a user