Andreas Schneider
8b7627efd5
tests: Make sure we null terminate the buffer.
...
CID: 1230359
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
2014-08-15 12:29:23 +02:00
Andreas Schneider
6961dd79ad
tests: Fix memory leak in buffer test.
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
2014-08-15 12:29:13 +02:00
Aris Adamantiadis
0cd0f685c9
torture_pki: avoid generating keys with ssh-keygen
...
ssh-keygen makes the tests very slow because new keys are generated
at the start of every test.
ssh-keygen on OSX doesn't support ecdsa keys, even if libcrypto does.
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-08-06 10:04:57 +02:00
Aris Adamantiadis
664b94d1c5
tests: test the canary feature in buffer_(un)pack()
...
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-08-06 10:00:07 +02:00
Aris Adamantiadis
1d97f75b0a
tests: test for ssh_buffer_(un)pack
...
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-08-06 09:20:45 +02:00
Andreas Schneider
d9c47a8cfa
tests: Add test for the logging function.
2014-06-10 13:52:20 +02:00
Jon Simons
48aca98cd5
pki crypto: expose new ssh_pki_key_ecdsa_name API
...
Enable retrieving the "ecdsa-sha2-nistpNNN" name of ECDSA keys with a
new 'ssh_pki_key_ecdsa_name' API. This gives more information than the
'ssh_key_type_to_char' API, which yields "ssh-ecdsa" for ECDSA keys.
The motivation is that this info is useful to have in a server context.
The torture_pki unit test is updated to include the new API, and a few
more passes are added to additionally test 384 and 521-bit keys.
Signed-off-by: Jon Simons <jon@jonsimons.org>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-04-09 11:01:11 +02:00
Andreas Schneider
fbf73ede1e
tests: Check the the ecdsa_nid is the same.
2014-03-27 10:01:12 +01:00
Alan Dunn
577840d7f7
tests: Add test case for bug #147
...
Signed-off-by: Alan Dunn <amdunn@gmail.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-03-27 10:01:01 +01:00
Andreas Schneider
cb9786b3ae
src: Rename buffer_add_data() to ssh_buffer_add_data().
2014-01-19 20:55:55 +01:00
Andreas Schneider
2fe59071b2
src: Do not use deprecated functions.
2014-01-16 15:27:46 +01:00
Andreas Schneider
8b407f1ca2
tests: Fix pki test with gcrypt.
2013-12-11 21:11:49 +01:00
Andreas Schneider
d1d3beac33
tests: Fix memory leaks.
2013-11-28 14:40:11 +01:00
Andreas Schneider
004240af48
tests: Add torture_pki_write_privkey_ecdsa test.
2013-11-27 22:54:13 +01:00
Andreas Schneider
4e3d16e291
tests: Add torture_pki_write_privkey_dsa test.
2013-11-27 22:54:13 +01:00
Andreas Schneider
7933aef747
tests: Add torture_pki_write_privkey_rsa test.
2013-11-27 22:54:13 +01:00
Andreas Schneider
060171028c
tests: Fix a valgrind warning.
2013-11-27 17:55:48 +01:00
Andreas Schneider
b00a6e3885
tests: Add a test for ssh_channel().
2013-10-31 12:44:48 +01:00
Andreas Schneider
48b715cce0
tests: Use fstat() after the open().
2013-07-13 13:59:58 +02:00
Andreas Schneider
e52cc613e4
BUG 103: Disable proxy command if set to 'none'.
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2013-07-11 15:34:50 +02:00
Andreas Schneider
68be73ec0d
tests: Check return value of stat.
2013-06-18 17:11:34 +02:00
Andreas Schneider
485e3b4014
tests: Check return values of buffer functions.
2013-06-18 17:10:00 +02:00
Andreas Schneider
d255d1bf32
tests: Use memory assert functions.
2013-06-17 11:44:28 +02:00
Andreas Schneider
01493b8d47
tests: Don't leak memory.
2013-06-13 15:42:13 +02:00
Aris Adamantiadis
cd4e28e7c8
test: Try to fetch wrong values in buffer.
...
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2012-11-27 19:10:41 +01:00
Andreas Schneider
b219d1890c
tests: Don't leak memory in options test.
2012-10-07 22:15:20 +02:00
Andreas Schneider
c81010e2f7
test: Use cmocka instead of cmockery.
...
cmocka is the successor of cmockery.
http://git.cryptomilk.org/projects/cmocka.git/
2012-10-07 11:10:27 +02:00
Andreas Schneider
ee774479de
session: Use a struct for all options.
2012-02-05 11:50:49 +01:00
Andreas Schneider
679cd9efd8
pki: Fix build if you don't have ECC support.
2012-02-04 18:37:05 +01:00
Andreas Schneider
ae59049347
tests: Test ecdsa key generation and signing.
2012-02-04 18:37:05 +01:00
Andreas Schneider
91372e298d
tests: Add duplicate ecdsa key test.
2012-02-04 18:37:04 +01:00
Andreas Schneider
14bb23ae3b
tests: Add ecdsa pubkey_from_privkey test.
2012-02-04 18:37:04 +01:00
Andreas Schneider
0e1992a9cc
tests: Add ecdsa publickey_from_privatekey test.
2012-02-04 18:37:04 +01:00
Andreas Schneider
fc8a182823
tests: Add a testing of importing ecdsa pubkeys.
2012-02-04 18:37:04 +01:00
Andreas Schneider
d44a79da9b
tests: Add test for reading ecdsa privkey.
2012-02-04 18:37:04 +01:00
Lee Hambley
17f396ffab
Improve ssh_options_get(ssh_session, enum ssh_options_e, char**).
...
* Use SSH_ERROR and SSH_OK instead of `-1` and `0`.
* Re-factor for code duplication
* No longer call `ssh_set_error_invalid(ssh_session)` when the
ssh_session is NULL.
2011-11-03 18:24:02 +01:00
Andreas Schneider
2c04994443
pki: Add a ssh_key_cmp() function.
2011-10-29 19:58:28 +02:00
Andreas Schneider
2cc48db673
tests: Fix build warning.
2011-10-29 19:58:10 +02:00
Lee Hambley
e797781bb5
Implement ssh_options_get_port(ssh_session, unsigned int*).
2011-10-28 12:15:12 +02:00
Lee Hambley
6bd95b50f5
Implement ssh_options_get(ssh_session, enum ssh_options_e, char**).
2011-10-28 12:14:34 +02:00
Aris Adamantiadis
21d68112b8
Torture: test new ssh_pki_generate function
2011-09-24 01:36:39 +02:00
Andreas Schneider
ae1f87e37a
options: Fix NULL value handling.
2011-09-06 09:16:54 +02:00
Andreas Schneider
822c68eb8e
pki: Use consistent API for ssh_pki_export_privkey_to_pubkey().
2011-08-30 10:28:57 +02:00
Andreas Schneider
fb4f1412ba
build: Fix the build of keyfiles torture test.
2011-08-28 14:50:28 +02:00
Andreas Schneider
a98301d2b0
tests: Add pki signature test.
2011-08-21 13:17:30 +02:00
Andreas Schneider
fa4f2d8bc1
tests: Add pki torture tests for keytypes.
2011-08-21 13:13:21 +02:00
Andreas Schneider
c8d06b6b1c
tests: Fix memleak in torture_pki.
2011-08-21 12:41:42 +02:00
Andreas Schneider
79029854f6
tests: Added more pki tests.
2011-08-20 12:59:19 +02:00
Andreas Schneider
bac5f62eaf
tests: Fix build warning.
2011-08-20 10:54:43 +02:00
Andreas Schneider
e3bd018465
tests: Fix the torture_pki test.
2011-08-20 10:48:34 +02:00