Andreas Schneider
e9ba2da9e9
tests: Some cleanup for torture_pki
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-11-04 08:21:39 +01:00
Justus Winter
9a54f91bb7
torture: Fix guard
...
* tests/unittests/torture_pki.c (setup_ecdsa_key*): Check for
'HAVE_ECC' instead of 'HAVE_OPENSSL_ECC'.
Signed-off-by: Justus Winter <justus@g10code.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-03-21 18:38:57 +01:00
Axel Eppe
d8be35de7f
tests: Add tests for the new ssh_pki cert functions
...
Signed-off-by: Axel Eppe <aeppe@google.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-09-07 13:30:34 +02:00
Andreas Schneider
3b0b1c3ee3
pki: Use the standard logging function
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-09-07 10:57:34 +02:00
Andreas Schneider
82a80b205b
tests: Migrate to new cmocka API
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-09-07 10:40:12 +02:00
Andreas Schneider
d54a1ab798
tests: Add checks for ssh_key_is_private()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-08-10 13:57:47 +02:00
Aris Adamantiadis
d42a1a35b0
tests: allow conditionnal execution on pattern
...
Option can be used to filter out irrelevant tests
usage: ./torture_pki '*ed25519'
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-02 17:34:15 +01:00
Aris Adamantiadis
c8d0b724b3
tests: Add ed25519 encrypted keys export
...
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-02 14:45:52 +01:00
Aris Adamantiadis
b76d37b341
tests: Add ed25519 encrypted keys import
...
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-02 14:45:52 +01:00
Aris Adamantiadis
4f5660e081
tests: Add ed25519 OpenSSH key saving
...
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-02 14:45:52 +01:00
Aris Adamantiadis
119840b0a9
tests: Add ed25519 OpenSSH key loading and operations
...
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-02 14:45:52 +01:00
Andreas Schneider
173994786b
tests: Fix writing the '\0'.
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2014-08-18 21:41:36 +02:00
Andreas Schneider
25eb9c4914
tests: Use public testkey passphrase function in pki test.
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
2014-08-15 12:32:57 +02:00
Andreas Schneider
c673543e54
tests: Use public testkeys in pki test.
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
2014-08-15 12:32:51 +02:00
Andreas Schneider
83aed7610c
tests: Make write file a public torture function.
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
2014-08-15 12:32:37 +02:00
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
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
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
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
48b715cce0
tests: Use fstat() after the open().
2013-07-13 13:59:58 +02:00
Andreas Schneider
68be73ec0d
tests: Check return value of stat.
2013-06-18 17:11:34 +02: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
Andreas Schneider
2c04994443
pki: Add a ssh_key_cmp() function.
2011-10-29 19:58:28 +02:00
Aris Adamantiadis
21d68112b8
Torture: test new ssh_pki_generate function
2011-09-24 01:36:39 +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
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
Andreas Schneider
c575de17a8
pki: Use a consistent naming scheme.
2011-08-19 11:14:23 +02:00
Andreas Schneider
3e56ac650c
tests: Fix torture_pki build warnings.
2011-08-19 11:14:06 +02:00
Andreas Schneider
765b42e68a
tests: Improve pki_import_privkey_base64 test.
2011-08-19 11:03:31 +02:00
Andreas Schneider
2615f8bc94
tests: Added test for pubkey from privkey.
2011-08-16 23:06:13 +02:00
Andreas Schneider
1a0fbedc2e
pki: Fix and rename ssh_pki_publickey_to_base64().
...
Rename it to ssh_pki_export_publickey_base64().
2011-08-16 23:04:25 +02:00
Andreas Schneider
254c30be2e
pki: Remove session from ssh_pki_import_pubkey_* functions.
2011-08-16 19:33:24 +02:00
Andreas Schneider
25a2108809
pki: Remove session from ssh_pki_import_privkey_* functions.
2011-08-16 18:53:18 +02:00