Andreas Schneider
2f6a866373
cmake: Only build libcrypto and libcrypto-compat when needed
...
This also fixes the gcrypt build.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-11-08 10:31:20 +01:00
Jakub Jelen
b6cfde8987
libcrypto: Introduce a libcrypto compat file
...
This is for OpenSSL 1.1.0 support.
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-11-07 11:42:06 +01:00
Justus Winter
e3a866b8c1
ecdh: Implement ECDH using libgcrypt
...
* include/libssh/crypto.h (struct ssh_crypto_struct): Provide a
suitable 'ecdh_privkey'.
* include/libssh/ecdh.h: Also define 'HAVE_ECDH' if we do ECC using
libgcrypt.
(ecdh_build_k): New prototype.
* src/CMakeLists.txt (libssh_SRCS): Add backend-specific files.
* src/ecdh.c: Move backend-specific parts to...
* src/ecdh_crypto.c: ... this file.
* src/ecdh_gcrypt.c: New file.
* src/wrapper.c (crypto_free): Free 'ecdh_privkey'.
Signed-off-by: Justus Winter <justus@g10code.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-11-03 15:20:36 +01:00
Aris Adamantiadis
9b3648ded0
connector: Implement ssh_connector_except()
...
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-05-02 16:58:47 +02:00
Andreas Schneider
5b586fdfec
cmake: Handle libssh threas library correctly
...
This should fix the build on Windows and would not install pkg files.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-09-07 07:46:11 +02:00
Andreas Schneider
728c2fbd01
cmake: Fix zlib include directory
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-07-03 12:36:26 +02:00
Douglas Heriot
a65af1b3b8
cmake: Do not use CMAKE_(SOURCE|BINARY)_DIR
2015-06-24 18:17:05 +02:00
Andreas Schneider
e8720a30e2
cmake: Add --enable-stdcall-fixup for MinGW builds
...
This fixes warnings for getaddrinfo() and freeaddrinfo().
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-05 18:59:30 +02:00
Andreas Schneider
6c7e552509
cmake: Require cmake version 2.8.0
2015-04-10 13:32:09 +02:00
Aris Adamantiadis
2490404d45
Move all 3rd-party C files to src/external/
...
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-02 14:45:53 +01:00
Aris Adamantiadis
61e2c8f0f7
external: Add OpenSSH bcrypt and blowfish implementation
...
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
3ec3a926e5
ed25519: Add support o import OpenSSH container keys
...
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-02 14:45:52 +01:00
Aris
93c7b81b4e
ed25519: Generate, sign and verify keys.
...
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-09-07 22:07:34 +02:00
Aris Adamantiadis
93e82fa0c0
crypto: Add ed25519 implementation from OpenSSH.
...
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-09-07 21:35:20 +02:00
Aris Adamantiadis
228dc08038
bignums: detach bignum-related functions from dh.c.
...
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-08-06 10:07:36 +02:00
Alan Dunn
099e2e8438
build: Do not link against libssl, only libcrypto
...
Signed-off-by: Alan Dunn <amdunn@gmail.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-04-22 09:24:54 +02:00
Raphael Kubo da Costa
398e8d50b5
build: Use Threads_FOUND to decide whether to build ssh_threads.
...
Follow-up to 4e04ec8, which caused a regression on OS X.
Checking the value of CMAKE_THREAD_LIBS_INIT to decide whether any threading
library is present on a system turns out to be wrong -- in OS X, for
example, usage of pthreads does not depend on any additional linker or
compiler flags, so CMAKE_THREAD_LIBS_INIT is empty and our check in
src/CMakeLists.txt failed (it used to work before 4e04ec8 because
CMAKE_HAVE_THREADS_LIBRARY is set).
Instead, just look for Threads_FOUND, which FindThreads sets just like any
other Find module when it has found what it was looking for.
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-02-06 11:12:50 +01:00
Raphael Kubo da Costa
4e04ec8bf5
threads: Be less strict when deciding whether to build libssh_threads.
...
As mentioned in the previous commit, there are cases where
CMAKE_HAVE_THREADS_LIBRARY is not set and pthreads _is_ being used: one can
pass -DTHREADS_HAVE_PTHREAD_ARG=1 to CMake directly so that it just passes
-pthread to the compiler/linker and does not set CMAKE_HAVE_THREADS_LIBRARY.
Since we are only interested in knowing whether any threading library has
been found, we should use CMAKE_THREAD_LIBS_INIT instead (Threads_FOUND
would also work).
Note that, at the moment, there is only a pthreads backend available in
threads/, so if it is not found configuration will fail because CMake will
try to create a library from an empty set of source files.
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-02-03 14:38:39 +01:00
Aris Adamantiadis
c5ef5ed18f
curve25519: include reference implementation
2013-11-03 14:58:10 +01:00
Aris Adamantiadis
4cb6afcbd4
kex: implement curve25519-sha256@libssh.org
2013-09-27 15:32:44 +02:00
Andreas Schneider
5ba88f01e8
cmake: Rewrote FindGSSAPI.cmake.
2013-07-24 20:48:14 +02:00
Andreas Schneider
1663917f71
cmake: Make GSSAPI optional.
2013-07-13 15:48:49 +02:00
Aris Adamantiadis
6c26a23cf4
build: build with gssapi if detected
...
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-07-13 14:19:23 +02:00
Aris Adamantiadis
4c99f5de4d
GSSAPI: added stub
...
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-07-13 14:11:26 +02:00
Andreas Schneider
ddcfe95bbd
cmake: Update GCrypt module.
2012-02-04 20:09:51 +01:00
Andreas Schneider
8a3b02f68d
cmake: Fix library linking.
2011-09-23 08:00:58 +02:00
Andreas Schneider
5083742192
packet: Move packet callbacks to packet_cb.c.
2011-09-18 21:37:18 +02:00
Andreas Schneider
dc42a1757f
gzip: Fix zlib support.
2011-09-18 21:37:18 +02:00
Andreas Schneider
b785014a15
crypt: Rename to packet_crypt.
2011-09-18 21:37:17 +02:00
Andreas Schneider
e7009fe8f3
priv: Create crc32.h.
...
As crc32 is only needed by SSHv1, build it only with SSHv1.
2011-09-18 21:37:17 +02:00
Andreas Schneider
bf72440eff
kex: Split out SSHv1 functions to kex1.c.
2011-09-10 11:03:46 +02:00
Andreas Schneider
fedfbf9563
keys: Remove obsolete keys.c.
2011-08-30 12:15:20 +02:00
Andreas Schneider
7c28d0ce6d
pki: Compile pki_gcrypt.c only if we need it.
2011-08-28 14:29:17 +02:00
Andreas Schneider
6ccb3f7a82
pki: Add pki_crypto.c.
2011-08-08 15:28:31 +02:00
Andreas Schneider
37b80e9261
pki: Move keyfiles to pki_gcrypt.c.
2011-08-08 15:28:31 +02:00
Aris Adamantiadis
c5a998f47a
[crypto] initial support for ecdh-sha2-nistp256
...
Works with openssl
Still requires work for libgcrypt and other modes
2011-06-13 13:46:34 +02:00
Andreas Schneider
1880ef54d2
cmake: Fix static .lib overwriting on Windows.
2011-06-01 14:52:27 +02:00
Aris Adamantiadis
a053d819a3
Fixed warnings on MacosX with Xcode4
2011-05-20 14:31:13 +02:00
Andreas Schneider
50a119dd0a
misc: Added multiplatform ssh_getpass() fuction.
2011-01-24 13:55:05 +01:00
Andreas Schneider
80d7ccb522
cmake: Added missing include dirs for libssh.
2010-12-29 20:18:18 +01:00
Andreas Schneider
57d752a1c3
include: Only require LIBSSH_STATIC on Windows.
2010-12-10 20:02:15 +01:00
Andreas Schneider
ef1cfbea70
build: Use the same name for static and shared library.
2010-12-10 20:00:23 +01:00
Aris Adamantiadis
ea4aa26dbb
Split ssh_bind functions in a new .c file
2010-10-20 16:54:22 +02:00
Andreas Schneider
b391a7603a
pki: Create a file for known_hosts functions.
2010-09-28 19:09:29 +02:00
Andreas Schneider
45b551d4f7
build: Remove unneeded include directories.
2010-09-28 19:08:11 +02:00
Andreas Schneider
fbe102bada
threads: Build a libssh threading library.
2010-09-06 15:17:03 +02:00
Andreas Schneider
f7842e3a4b
misc: Rename libssh/ to src/
2010-09-06 14:28:38 +02:00