diff options
author | Sahana Prasad <sahana@redhat.com> | 2019-12-10 18:19:59 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-12-20 14:36:04 +0100 |
commit | fa6fb83c87b51417442420f2a51b61fdccc7953e (patch) | |
tree | 551839893018365794222cb238e3c9cc34a061a1 | |
parent | 314448786e472c99797e85af84a19b49ac897345 (diff) | |
download | libssh-fa6fb83c87b51417442420f2a51b61fdccc7953e.tar.gz libssh-fa6fb83c87b51417442420f2a51b61fdccc7953e.tar.xz libssh-fa6fb83c87b51417442420f2a51b61fdccc7953e.zip |
cmake: Add new option for PKCS11 URI support
Signed-off-by: Sahana Prasad <sahana@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | ConfigureChecks.cmake | 11 | ||||
-rw-r--r-- | DefineOptions.cmake | 1 | ||||
-rw-r--r-- | config.h.cmake | 3 |
4 files changed, 16 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8008fe25..6375f9dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -226,6 +226,7 @@ message(STATUS "Build shared library: ${BUILD_SHARED_LIBS}") message(STATUS "Unit testing: ${UNIT_TESTING}") message(STATUS "Client code testing: ${CLIENT_TESTING}") message(STATUS "Blowfish cipher support: ${WITH_BLOWFISH_CIPHER}") +message(STATUS "PKCS #11 URI support: ${WITH_PKCS11_URI}") set(_SERVER_TESTING OFF) if (WITH_SERVER) set(_SERVER_TESTING ${SERVER_TESTING}) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index a99278f7..ace00f38 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -467,6 +467,17 @@ if (WITH_GSSAPI AND NOT GSSAPI_FOUND) set(WITH_GSSAPI 0) endif (WITH_GSSAPI AND NOT GSSAPI_FOUND) +if (WITH_PKCS11_URI) + if (WITH_GCRYPT) + message(FATAL_ERROR "PKCS #11 is not supported for gcrypt.") + set(WITH_PKCS11_URI 0) + endif() + if (WITH_WITH_MBEDTLS) + message(FATAL_ERROR "PKCS #11 is not supported for mbedcrypto") + set(WITH_PKCS11_URI 0) + endif() +endif() + # ENDIAN if (NOT WIN32) test_big_endian(WORDS_BIGENDIAN) diff --git a/DefineOptions.cmake b/DefineOptions.cmake index b82a5018..59e8fb9b 100644 --- a/DefineOptions.cmake +++ b/DefineOptions.cmake @@ -11,6 +11,7 @@ option(WITH_BLOWFISH_CIPHER "Compile with blowfish support" OFF) option(WITH_PCAP "Compile with Pcap generation support" ON) option(WITH_INTERNAL_DOC "Compile doxygen internal documentation" OFF) option(BUILD_SHARED_LIBS "Build shared libraries" ON) +option(WITH_PKCS11_URI "Build with PKCS#11 URI support" OFF) option(UNIT_TESTING "Build with unit tests" OFF) option(CLIENT_TESTING "Build with client tests; requires openssh" OFF) option(SERVER_TESTING "Build with server tests; requires openssh and dropbear" OFF) diff --git a/config.h.cmake b/config.h.cmake index 847fc579..83612f85 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -281,6 +281,9 @@ /* Define to 1 if you want to enable NaCl support */ #cmakedefine WITH_NACL 1 +/* Define to 1 if you want to enable PKCS #11 URI support */ +#cmakedefine WITH_PKCS11_URI 1 + /*************************** ENDIAN *****************************/ /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most |