aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2016-05-02pki_gcrypt: Rework 'pki_key_dup'Justus Winter1-221/+66
* src/pki_gcrypt.c (pki_key_dup): Rework to be more idiomatic. Signed-off-by: Justus Winter <justus@g10code.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-05-02libgcrypt: Add helper to extract MPIs into ssh_stringsJustus Winter1-0/+52
* include/libssh/libgcrypt.h (ssh_sexp_extract_mpi): New prototype. * src/libgcrypt.c (ssh_sexp_extract_mpi): New function. Signed-off-by: Justus Winter <justus@g10code.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-05-02options: Check if a port has been givenJustus Winter1-1/+3
* src/options.c (ssh_options_getopt): Only call 'ssh_options_set' if a port has been given. Signed-off-by: Justus Winter <justus@g10code.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-05-02dh: Rename ssh_get_publickey() to ssh_get_server_publickey()Andreas Schneider1-1/+9
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-03-21pki: Mention relevant RFC for EC key encodingJustus Winter1-0/+2
* src/pki.c (ssh_pki_export_pubkey_blob): Mention relevant RFC for EC key encoding. Signed-off-by: Justus Winter <justus@g10code.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-03-21pki_gcrypt: Fix memory leakJustus Winter1-5/+7
* src/pki_gcrypt.c (_bignum_cmp): Fix memory leak. Signed-off-by: Justus Winter <justus@g10code.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-03-21pki_gcrypt: Burn key materialJustus Winter1-0/+11
* src/pki_gcrypt.c (b64decode_rsa_privatekey): Burn key material. (b64decode_dsa_privatekey): Likewise. Signed-off-by: Justus Winter <justus@g10code.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-03-21pki_gcrypt: Generalize asn1_get_intJustus Winter1-2/+6
* src/pki_gcrypt.c (asn1_get): Generalize from 'asn1_get_int'. (asn1_get_int): New function simply calling 'asn1_get'. Signed-off-by: Justus Winter <justus@g10code.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-03-21pki_gcrypt: Fix memory leakJustus Winter1-0/+2
* src/pki_gcrypt.c (b64decode_rsa_privatekey): Free 'v' on version mismatch. (b64decode_dsa_privatekey): Likewise. Signed-off-by: Justus Winter <justus@g10code.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-03-15agent: Add cert auth support to ssh_agent_get_next_ident()Axel Eppe1-0/+4
Signed-off-by: Axel Eppe <aeppe@google.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-03-15auth: Add cert auth support to ssh_userauth_publickey()Axel Eppe1-4/+10
Signed-off-by: Axel Eppe <aeppe@google.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-03-15pki_gcrypt: Add cert auth support to pki_publickey_to_blob()Axel Eppe1-0/+10
Signed-off-by: Axel Eppe <aeppe@google.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-03-15pki_crypto: Add cert auth support to pki_publickey_to_blob()Axel Eppe1-0/+10
Signed-off-by: Axel Eppe <aeppe@google.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-03-14server: handle keepalive@openssh.com global requestsAris Adamantiadis1-0/+9
2016-03-03options: Document SSH_OPTIONS_ADD_IDENTITYAndreas Schneider1-0/+11
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-02-23dh: Fix CVE-2016-0739Aris Adamantiadis1-5/+17
Due to a byte/bit confusion, the DH secret was too short. This file was completely reworked and will be commited in a future version. Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-02-23options: Fix documentation typoHani Benhabiles1-1/+1
Signed-off-by: Hani Benhabiles <hani@linux.com> Reviewed-by: Andreas Schneider <asn@samba.org>
2016-02-23pki: Fixed documentation about return value.Younes Serraj1-1/+1
Documentation now is congruent with the code: - SSH_OK is returned on success, - SSH_ERROR is returned on error. Signed-off-by: Younes Serraj <younes.serraj@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org>
2016-01-19buffer: expose ssh_buffer_get()Fabiano Fidêncio1-2/+0
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19buffer: expose ssh_buffer_{add,get}_data()Fabiano Fidêncio1-4/+0
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19buffer: expose ssh_buffer_reinit()Fabiano Fidêncio1-2/+0
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19buffer: remove ssh_buffer_get_begin()Fabiano Fidêncio1-17/+0
Note that removing ssh_buffer_get_begin() doesn't break API compatibility, as this functions has never been exposed (it only has the LIBSSH_API prefix). Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19buffer: use ssh_buffer_get() instead of ssh_buffer_get_begin()Fabiano Fidêncio8-25/+25
This commit is a preparatory stage for removing ssh_buffer_get_begin(). Note that removing ssh_buffer_get_begin() doesn't break API compatibility, as this functions has never been exposed (it only has the LIBSSH_API prefix). Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19buffer: remove ssh_buffer_get_rest_len()Fabiano Fidêncio1-16/+1
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19buffer: do not use ssh_buffer_get_rest_len()Fabiano Fidêncio18-83/+83
As ssh_buffer_get_len() actually calls ssh_buffer_get_rest_len(), let's just use the first one. This is a preparatory step for removing ssh_buffer_get_rest_len(). Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19pki_gcrypt: adapt to the new behavior of ssh_buffer_get_len()Fabiano Fidêncio1-2/+2
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19buffer: make ssh_buffer_get_len() call ssh_buffer_get_rest_len()Fabiano Fidêncio1-1/+1
This is a preparatory step for having the behavior of ssh_buffer_get_rest_len() in the ssh_buffer_get_len() and then remove the ssh_buffer_rest_len() Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19buffer: rename ssh_buffer_get_rest() to ssh_buffer_get()Fabiano Fidêncio17-46/+45
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19buffer: cosmetic change in ssh_buffer_get_u8() documentationFabiano Fidêncio1-1/+1
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19buffer: fix documentation for ssh_buffer_get_u32()Fabiano Fidêncio1-6/+10
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19pki_gcrypt: Fix warning about not handled values in switchFabiano Fidêncio1-0/+2
/home/ffidenci/src/upstream/libssh/src/pki_gcrypt.c: In function ‘pki_key_compare’: /home/ffidenci/src/upstream/libssh/src/pki_gcrypt.c:1082:5: warning: enumeration value ‘SSH_KEYTYPE_DSS_CERT01’ not handled in switch [-Wswitch] switch (k1->type) { ^ /home/ffidenci/src/upstream/libssh/src/pki_gcrypt.c:1082:5: warning: enumeration value ‘SSH_KEYTYPE_RSA_CERT01’ not handled in switch [-Wswitch] Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19cleanup: use ssh_ prefix in the packet (non-static) functionsFabiano Fidêncio17-77/+77
Having "ssh_" prefix in the functions' name will avoid possible clashes when compiling libssh statically. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19cleanup: use ssh_ prefix in the gcrypt missing functionsFabiano Fidêncio1-2/+2
Having "ssh_" prefix in the functions' name will avoid possible clashes when compiling libssh statically. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19cleanup: use ssh_ prefix in the kex (non-static) functionsFabiano Fidêncio4-7/+7
Having "ssh_" prefix in the functions' name will avoid possible clashes when compiling libssh statically. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19cleanup: use ssh_ prefix in the dh (non-static) functionsFabiano Fidêncio6-36/+36
Having "ssh_" prefix in the functions' name will avoid possible clashes when compiling libssh statically. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19cleanup: use ssh_ prefix in the channels (non-static) functionsFabiano Fidêncio2-12/+12
Having "ssh_" prefix in the functions' name will avoid possible clashes when compiling libssh statically. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19cleanup: use ssh_ prefix in the buffer (non-static) functionsFabiano Fidêncio28-437/+437
Having "ssh_" prefix in the functions' name will avoid possible clashes when compiling libssh statically. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19cleanup: use ssh_ prefix in the blf (non-static) functionsFabiano Fidêncio2-23/+23
Having "ssh_" prefix in the functions' name will avoid possible clashes when compiling libssh statically. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19cleanup: use ssh_ prefix in the bignum (non-static) functionsFabiano Fidêncio5-31/+31
Having "ssh_" prefix in the functions' name will avoid possible clashes when compiling libssh statically. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19cleanup: use ssh_ prefix in the agent (non-static) functionsFabiano Fidêncio3-8/+8
Having "ssh_" prefix in the functions' name will avoid possible clashes when compiling libssh statically. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19auth: Remove references to ssh_userauth_pubkey in documentationYounes Serraj1-7/+6
- replaced references to ssh_userauth_pubkey (legacy function) by ssh_userauth_publickey. - added missing \n in a couple of Returns sections. This patch is an answer to this discussion: http://www.libssh.org/archive/libssh/2016-01/0000009.html Signed-off-by: Younes Serraj <younes.serraj@gmail.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19pki: Make sure checkint1 and checkint2 are not used uninitializedAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19buffer: Make sure we do not use u32len uninitializedAndreas Schneider1-2/+4
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-14doc: Update documentation of ssh_userauth_try_publickey()Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-12-17Fix a bunch of -Wmaybe-uninitializedFabiano Fidêncio3-3/+3
Reviewed-By: Aris Adamantiadis <aris@0xbadc0de.be>
2015-10-22libcrypto: Fix build with DEBUG_CRYPTO turned onAndreas Schneider1-15/+18
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-10-20agent: Fix agent auth on big endian machinesAndreas Schneider1-4/+13
BUG: https://red.libssh.org/issues/204 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-09-25crypto: fix broken ifdefAris Adamantiadis1-2/+2
2015-09-25crypto: old-fashioned aes_ctr when evp_aes_ctr is missingAris Adamantiadis1-0/+92
2015-09-25SSH1: fix duplicate identifierAris Adamantiadis1-1/+1