diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2015-01-21 09:19:30 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2015-01-21 09:19:30 +0100 |
commit | f6a50aff4c07934648cf0d43000d08c278670251 (patch) | |
tree | deba2d62f6e2497758f5aabb952011562adfd1bc /tests/unittests | |
parent | 6b7f275c32418a1a38b6f01466299469f9995f4c (diff) | |
download | libssh-f6a50aff4c07934648cf0d43000d08c278670251.tar.gz libssh-f6a50aff4c07934648cf0d43000d08c278670251.tar.xz libssh-f6a50aff4c07934648cf0d43000d08c278670251.zip |
tests: Fix torture_server_x11().
Diffstat (limited to 'tests/unittests')
-rw-r--r-- | tests/unittests/torture_server_x11.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/unittests/torture_server_x11.c b/tests/unittests/torture_server_x11.c index 29190869..0b86c692 100644 --- a/tests/unittests/torture_server_x11.c +++ b/tests/unittests/torture_server_x11.c @@ -12,6 +12,7 @@ struct hostkey_state { const char *hostkey; char *hostkey_path; + enum ssh_keytypes_e key_type; int fd; }; @@ -27,7 +28,8 @@ static void setup(void **state) { assert_return_code(h->fd, errno); close(h->fd); - h->hostkey = torture_get_testkey(SSH_KEYTYPE_ECDSA, 512, 0); + h->key_type = SSH_KEYTYPE_RSA; + h->hostkey = torture_get_testkey(h->key_type, 0, 0); torture_write_file(h->hostkey_path, h->hostkey); @@ -152,7 +154,10 @@ static void test_ssh_channel_request_x11(void **state) { ssh_callbacks_init(&server_cb); /* Create server */ - sshbind = torture_ssh_bind("localhost", TEST_SERVER_PORT, h->hostkey_path); + sshbind = torture_ssh_bind("localhost", + TEST_SERVER_PORT, + h->key_type, + h->hostkey_path); assert_non_null(sshbind); /* Get client to connect */ |