Nikos Mavrogiannopoulos
895055ab38
ssh_options_set_algo: ensure we only set known algorithms internally
...
That way, we will not fail later on key exchange phase when something
unknown is negotiated.
Fixes T37
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com >
Reviewed-by: Andreas Schneider <asn@samba.org >
2017-08-24 18:01:34 +02:00
Alfredo Mazzinghi
9dc650b7fb
server: Add option SSH_BIND_OPTIONS_IMPORT_KEY to server
...
This sets the bind private key directly from an ssh_key struct instead
of reading a file.
Signed-off-by: Alfredo Mazzinghi <am2419@cl.cam.ac.uk >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2017-04-11 10:00:13 +02:00
Andreas Schneider
801bc29494
options: Fix log level documentation
...
BUG: https://red.libssh.org/issues/210
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
2016-11-05 17:15:31 +01:00
Pino Toscano
67ffe26dea
Remove extra newlines from log/error messages
...
Signed-off-by: Pino Toscano <ptoscano@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2016-10-22 16:05:32 +02:00
Justus Winter
fea9e3050c
options: Check if a port has been given
...
* 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-02 11:55:38 +02:00
Andreas Schneider
4d43fbfb50
options: Document SSH_OPTIONS_ADD_IDENTITY
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
2016-03-03 20:07:16 +01:00
Hani Benhabiles
f8bde7156f
options: Fix documentation typo
...
Signed-off-by: Hani Benhabiles <hani@linux.com >
Reviewed-by: Andreas Schneider <asn@samba.org >
2016-02-23 08:14:29 +01:00
Fabiano Fidêncio
1102ea4c55
cleanup: use ssh_ prefix in the kex (non-static) functions
...
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-19 11:31:07 +01:00
Seb Boving
e020dd8d59
Don't allocate a new identity list in the new session's options.
...
The previous list is not freed. Since the new session just got
created, an identity list is already allocated and empty.
Signed-off-by: Sebastien Boving <seb@google.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2015-06-24 18:28:36 +02:00
Aris Adamantiadis
c02b260e7e
server: Add support for ed25519 keys in the server.
...
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
bb18442fe8
options: Fix setting the port.
...
Make sure we correctly read the port from the config file.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
2014-12-25 12:32:16 +01:00
Hani Benhabiles
03095f1516
Set the correct error in ssh_options_set().
...
Signed-off-by: Hani Benhabiles <hani@linux.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2014-12-05 11:03:55 +01:00
Dirkjan Bussink
6c74d6f891
Add options support for setting and getting HMAC algorithms
...
BUG: https://red.libssh.org/issues/91
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2014-04-22 10:57:18 +02:00
Alan Dunn
2f4589b765
doc: Document new meaning of SSH_BIND_OPTIONS_HOSTKEY
...
Signed-off-by: Alan Dunn <amdunn@gmail.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2014-04-09 10:59:10 +02:00
Alan Dunn
acb7161c81
options: Repurpose SSH_BIND_OPTIONS_HOSTKEY to load host keys
...
SSH_BIND_OPTIONS_HOSTKEY will now load host keys of any supported type
rather than set the algorithms that the server permits (which seems
like an unhelpful option anyway; it seems you can always control this
by just loading the right keys).
This option has slightly different semantics than the
SSH_BIND_OPTIONS_<x>KEY options because it requires the key file to
exist immediately rather than on ssh_bind_listen or
ssh_bind_accept_fd. The semantics of this option makes more sense to
me.
We also eliminate ssh_bind_options_set_algo, since it is no longer
used.
Signed-off-by: Alan Dunn <amdunn@gmail.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2014-04-09 10:57:16 +02:00
Luka Perkov
53644a14ac
style: be consistent when iterating over wanted_methods
...
Signed-off-by: Luka Perkov <luka.perkov@sartura.hr >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2014-03-27 11:23:34 +01:00
Alan Dunn
47bd0b6d1f
doc: Improve and consolidate ssh_bind_options_set docs
...
Signed-off-by: Alan Dunn <amdunn@gmail.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2014-03-27 10:49:08 +01:00
Alan Dunn
f6276fe739
doc: Add ECDSA keys to docs, make key docs consistent
...
Signed-off-by: Alan Dunn <amdunn@gmail.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2014-03-27 10:05:58 +01:00
Alan Dunn
2a1089d607
options: Allow use of host ECDSA key
...
Signed-off-by: Alan Dunn <amdunn@gmail.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2014-03-27 10:05:23 +01:00
Andreas Schneider
6fe51b13fb
src: Update my mail address.
2014-01-07 16:08:23 +01:00
Aris Adamantiadis
aecd952d18
update copyright information
2014-01-07 15:18:15 +01:00
Aris Adamantiadis
f6443b725a
logging: fix server-side logging
2013-11-18 15:29:27 +01:00
Simo Sorce
811c645f2a
options: Add SSH_OPTIONS_GSSAPI_DELEGATE_CREDENTIALS option.
...
Signed-off-by: Simo Sorce <simo@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2013-11-15 16:10:29 -05:00
Andreas Schneider
095a01b70c
options: Add SSH_OPTIONS_GSSAPI_CLIENT_IDENTITY option.
2013-11-15 15:50:09 +01:00
Andreas Schneider
41d99d32e8
gssapi: Add suppport to set GSSAPI server identity.
2013-11-15 15:50:09 +01:00
Andreas Schneider
6f0f1ef292
doc: Fix doxygen warnings.
2013-11-04 21:55:29 +01:00
William Orr
ce1d73e0f0
ssh_options_get can now return ProxyCommand
...
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2013-11-02 21:02:56 +01:00
Andreas Schneider
329f4da1e1
options: Fix compiler warning on Windows.
2013-07-22 10:42:30 +02:00
Andreas Schneider
f3e09612b3
options: Set log level through options too.
2013-07-21 11:26:32 +02:00
Andreas Schneider
0d3deeec10
options: Use the new function to use the log level.
2013-07-14 12:53:01 +02:00
Aris Adamantiadis
fadbe80c43
options: Fix null ptr deference introduced in earlier fix.
...
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2013-07-13 14:24:57 +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
e41482fec4
opts: Fix segfault in option parser.
2013-06-02 18:34:39 +02:00
Andreas Schneider
21a45e89c5
options: Fix a free crash bug if we parse unknown options.
...
Thanks to Yong Chuan Koh, X-Force Research <kohyc@sg.ibm.com >
2013-01-22 11:32:47 +01:00
Andreas Schneider
13c26f0733
options: Fix documentation of ssh_options_get_port().
2012-10-14 19:53:51 +02:00
Andreas Schneider
95ab34696b
kex: Use getter functions to access kex arrays.
...
This should fix the build on OpenIndiana.
2012-10-12 17:46:37 +02:00
Andreas Schneider
5e8e21d106
options: Check return code of ssh_iterator_value.
...
Found by Coverity.
2012-10-12 08:07:01 +02:00
Andreas Schneider
213321d706
options: Fix a memory in ssh_options_copy() on error.
2012-10-05 11:12:13 +02:00
Andreas Schneider
cddfe602cc
options: Fix a memory leak if we can't add an idenity.
2012-10-05 11:08:51 +02:00
Dmitriy Kuznetsov
e689375e45
dh: Add support for diffie-hellman-group14-sha1.
2012-09-04 16:17:46 +02:00
Oliver Gasser
ad24427f03
options: Add option to specify host keys string.
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
2012-07-06 11:04:05 +02:00
Andreas Schneider
ee774479de
session: Use a struct for all options.
2012-02-05 11:50:49 +01:00
Lee Hambley
a15399992e
Fix logic erorr with brace-less conditional statement
2012-01-03 19:41:28 +01:00
Andreas Schneider
90893fd1a3
options: Fix typo in ssh_options_get() docs.
2011-12-14 13:45:19 +01:00
Andreas Schneider
99d2cf02a6
options: Add missing argument check.
2011-11-03 18:24:52 +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
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
Andreas Schneider
519291558d
priv: Move options and config prototypes to own header.
2011-09-18 21:37:17 +02:00
Andreas Schneider
c19c638d74
error: Use macros for error functions.
2011-09-17 10:38:08 +02:00