diff options
author | Justus Winter <justus@g10code.com> | 2016-05-02 16:00:26 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2016-11-03 15:20:36 +0100 |
commit | e3a866b8c19601803d1f8aaea40573c738d4acfd (patch) | |
tree | d5c130d2830d24651505dc5be67efdc835b1afe3 /src/CMakeLists.txt | |
parent | f62cded9f0bc2d08afe0ef2d79e247951f193559 (diff) | |
download | libssh-e3a866b8c19601803d1f8aaea40573c738d4acfd.tar.gz libssh-e3a866b8c19601803d1f8aaea40573c738d4acfd.tar.xz libssh-e3a866b8c19601803d1f8aaea40573c738d4acfd.zip |
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>
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a3e08a61..ab9f1843 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -159,11 +159,13 @@ if (WITH_GCRYPT) libgcrypt.c gcrypt_missing.c pki_gcrypt.c + ecdh_gcrypt.c ) else (WITH_GCRYPT) set(libssh_SRCS ${libssh_SRCS} pki_crypto.c + ecdh_crypto.c ) endif (WITH_GCRYPT) |