1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-08-08 19:02:06 +03:00
Commit Graph

167 Commits

Author SHA1 Message Date
Andreas Schneider
9a7d450098 pki: Make sure sig is not used unintialized.
BUG: https://red.libssh.org/issues/167

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-01-20 19:31:12 +01:00
Jon Simons
59da8dab50 pki: check ssh_buffer_pack return in ssh_pki_do_sign
Check the 'ssh_buffer_pack' return in ssh_pki_do_sign for the ED25519 case.

Signed-off-by: Jon Simons <jon@jonsimons.org>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-10-02 08:28:05 +02:00
Jon Simons
7edbedf0dd pki: fail when pubkey buffer length is not ED25519_PK_LEN
Fail fast in 'pki_import_pubkey_buffer' for the ED25519 case if a buffer
sized ED25519_PK_LEN can not be retrieved.  Before, the 'memcpy' could
have read beyond the bounds of 'ssh_string_data(pubkey)'.

Signed-off-by: Jon Simons <jon@jonsimons.org>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-10-02 08:27:05 +02:00
Aris
93c7b81b4e ed25519: Generate, sign and verify keys.
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-09-07 22:07:34 +02:00
Andreas Schneider
83633d539e pki: Fix build without ECC support.
Signed-off-by: Andreas Schneider <asn@samba.org>
2014-05-09 08:55:49 +02:00
Hani Benhabiles
2c7dfb02a8 Small documentation fix.
Signed-off-by: Hani Benhabiles <hani@linux.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-05-06 08:52:55 +02:00
Andreas Schneider
2884bbf5b1 pki: Correctly update the ECDSA keytype. 2014-04-23 11:16:28 +02:00
Andreas Schneider
f48a99b97c pki: Move ssh_pki_key_ecdsa_name() to the correct file. 2014-04-23 11:15:05 +02:00
Alan Dunn
15f3988bc8 pki: Use SHA-2 for session ID signing with ECDSA keys
Previously, SHA-1 was used always.

BUG: https://red.libssh.org/issues/148

Signed-off-by: Alan Dunn <amdunn@gmail.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-03-12 14:13:29 +01:00
Andreas Schneider
370d4b014d pki: Fix the build on OpenSolaris. 2014-02-12 09:39:49 +01:00
Andreas Schneider
7bd5e4101c pki: Fix memory leak with ecdsa signatures. 2014-02-11 10:32:50 +01:00
Andreas Schneider
cb9786b3ae src: Rename buffer_add_data() to ssh_buffer_add_data(). 2014-01-19 20:55:55 +01:00
Aris Adamantiadis
aecd952d18 update copyright information 2014-01-07 15:18:15 +01:00
Andreas Schneider
cdd7a6cb8d pki: Fix a memory leak.
CID #1132819
2013-11-28 09:09:45 +01:00
Andreas Schneider
136efd6ed5 pki: Add ssh_pki_import_privkey_file(). 2013-11-27 22:54:13 +01:00
Andreas Schneider
33890daf41 pki: Add support for ECDSA private key signing. 2013-10-18 23:22:24 +02:00
Andreas Schneider
ac4c5699b1 pki: Add the type as a char pointer. 2013-10-18 23:22:24 +02:00
Andreas Schneider
33cb1bc08b doc: Improve the PKI documentation a bit. 2013-09-10 06:59:25 +02:00
Andreas Schneider
ebdd0c6ac1 src: Migrate to SSH_LOG. 2013-07-14 12:44:26 +02:00
Aris Adamantiadis
bf5e5eebd7 pki: fix comments 2013-07-13 23:01:30 +02:00
Aris Adamantiadis
dd6a0b51ac Server: fix rekeying 2013-07-13 22:56:07 +02:00
Andreas Schneider
d83b3d9ebe pki: Limit privkey to 4M for now. 2013-06-17 12:07:32 +02:00
Andreas Schneider
6f8b5ed679 pki: Fix a resource leak on error. 2013-06-17 11:49:13 +02:00
Andreas Schneider
09663692dd pki: Use fstat() after opening the file. 2013-06-13 11:04:59 +02:00
Andreas Schneider
e403596d98 pki: Add a size limit for pubkey files. 2012-11-21 12:44:00 +01:00
Xi Wang
cab00c3bfc pki: Fix integer overflow in ssh_pki_import_privkey_file().
If the file size is ULONG_MAX, the call to malloc() may allocate a
small buffer, leading to a memory corruption.
2012-10-22 21:00:08 +02:00
Andreas Schneider
3d390cf6ff pki: Make sure the key_buf is null terminated.
Found by Coverity.
2012-10-12 14:45:54 +02:00
Andreas Schneider
0a4ea19982 pki: Fix a possible null pointer dereference.
Found by Coverity.
2012-10-12 08:07:02 +02:00
Andreas Schneider
3e93836e8b pki: Make error handling code reachable again.
Found by Coverity.
2012-10-09 11:09:34 +02:00
Andreas Schneider
bfa568e448 pki: Check for no memory available calling ssh_key_new(). 2012-10-07 22:04:58 +02:00
Andreas Schneider
3db2ac41eb pki: Handle error of pki_import_pubkey_buffer() correctly. 2012-10-07 21:53:37 +02:00
Andreas Schneider
977951e96a pki: Open privkey file in binary mode.
This is needed to correctly detect carriage return.
2012-09-04 11:28:33 +02:00
Andreas Schneider
4019dbed85 pki: Add ecdsa support for signature verification. 2012-02-04 23:45:01 +01:00
Andreas Schneider
0770843309 pki: Fix ssh_pki_log function. 2012-02-04 23:03:53 +01:00
Andreas Schneider
e93f17cad8 pki: Don't free a const key! 2012-02-04 22:07:03 +01:00
Andreas Schneider
e4d0ac7ba1 pki: Update copyright. 2012-02-04 20:37:29 +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
b309dd8fb7 pki: Add support to generate ecdsa keys. 2012-02-04 18:37:04 +01:00
Andreas Schneider
f35c284761 pki: Add support to import ecdsa pubkeys. 2012-02-04 18:37:04 +01:00
Andreas Schneider
ea74a12b70 pki: Add support to import ecdsa private keys. 2012-02-04 18:37:03 +01:00
Andreas Schneider
244fa0474b pki: Fix typo in error message. 2012-02-04 18:37:03 +01:00
Andreas Schneider
2c04994443 pki: Add a ssh_key_cmp() function. 2011-10-29 19:58:28 +02:00
Aris Adamantiadis
e38f2f933b pki: ssh_pki_generate
for both gcrypt and openssl
2011-09-24 01:36:58 +02:00
Aris Adamantiadis
d24e353e38 pki: null ptr check 2011-09-18 20:34:16 +02:00
Andreas Schneider
fa7798833a pki: Use ssh_log_function() for ssh_pki_log(). 2011-09-17 11:09:19 +02:00
Andreas Schneider
4a5b72a535 pki: Use ssh_string_get_char(). 2011-09-08 16:14:35 +02:00
Andreas Schneider
808c7a9be4 pki: Add ssh_pki_export_pubkey_rsa1(). 2011-09-05 11:28:19 +02:00
Andreas Schneider
a0e3facac7 pki: Add ecdsa key support. 2011-09-02 23:10:23 +02:00
Andreas Schneider
b5b3db6c90 pki: Check the type of the key blob earlier. 2011-08-30 22:35:01 +02:00
Andreas Schneider
822c68eb8e pki: Use consistent API for ssh_pki_export_privkey_to_pubkey(). 2011-08-30 10:28:57 +02:00