Skip to content

Commit 430dfe4

Browse files
authored
Merge pull request #2074 from jan-cerny/nss
Fix broken build with NSS crypto back end
2 parents 8fedd96 + 0c858c6 commit 430dfe4

File tree

14 files changed

+291
-1403
lines changed

14 files changed

+291
-1403
lines changed

CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,13 @@ check_library_exists(pthread pthread_setname_np "" HAVE_PTHREAD_SETNAME_NP)
176176
check_library_exists(pthread pthread_getname_np "" HAVE_PTHREAD_GETNAME_NP)
177177

178178
# WITH_CRYPTO
179-
set(WITH_CRYPTO "gcrypt" CACHE STRING "gcrypt|nss3")
180-
if(NOT (${WITH_CRYPTO} EQUAL "nss3"))
181-
# gcrypt
182-
find_package(GCrypt)
183-
else()
184-
# nss3
179+
set(WITH_CRYPTO "gcrypt" CACHE STRING "gcrypt|nss")
180+
if(${WITH_CRYPTO} STREQUAL "nss")
181+
message("-- Using NSS")
185182
find_package(NSS)
183+
else()
184+
message("-- Using GCrypt")
185+
find_package(GCrypt)
186186
endif()
187187
if(GCRYPT_FOUND OR NSS_FOUND)
188188
set(CRYPTO_FOUND TRUE)

cmake/FindNSS.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
# Redistribution and use is allowed according to the terms of the BSD license.
1212
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
1313

14-
include(FindLibraryWithDebug)
15-
1614
if (NSS_LIBRARIES)
1715
set(NSS_FIND_QUIETLY TRUE)
1816
endif ()

config.h.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
#cmakedefine HAVE_GCRYCTL_SET_ENFORCED_FIPS_FLAG
2020
#endif
2121

22-
#cmakedefine NSS3_FOUND
23-
#if defined(NSS3_FOUND)
22+
#cmakedefine NSS_FOUND
23+
#if defined(NSS_FOUND)
2424
#define HAVE_NSS3
2525
#endif
2626

0 commit comments

Comments
 (0)