diff options
| author | Brent Cook <busterb@gmail.com> | 2023-11-05 14:31:01 -0600 |
|---|---|---|
| committer | Brent Cook <busterb@gmail.com> | 2023-11-05 14:31:01 -0600 |
| commit | ba0adb9a2f8bc85b6a6ad451fed93c0cf04fdc42 (patch) | |
| tree | d59fe4e7ceed270049694c17e1f19f19d4730256 | |
| parent | d193f43f8b90cbed65ffeec93543d8a3d17bdedc (diff) | |
| parent | 89fcb1a3e50ac224d68891a6014b74639a5f551a (diff) | |
| download | portable-ba0adb9a2f8bc85b6a6ad451fed93c0cf04fdc42.tar.gz portable-ba0adb9a2f8bc85b6a6ad451fed93c0cf04fdc42.tar.bz2 portable-ba0adb9a2f8bc85b6a6ad451fed93c0cf04fdc42.zip | |
Land #930, consistently use default CA cert location for Windows
| -rw-r--r-- | CMakeLists.txt | 18 | ||||
| -rw-r--r-- | apps/nc/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | apps/ocspcheck/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | crypto/CMakeLists.txt | 10 | ||||
| -rw-r--r-- | tls/CMakeLists.txt | 6 |
5 files changed, 16 insertions, 30 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f0dfa0..ca7f565 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -414,6 +414,18 @@ else() | |||
| 414 | set(LIBTLS_TEST_LIBS tls ${PLATFORM_LIBS}) | 414 | set(LIBTLS_TEST_LIBS tls ${PLATFORM_LIBS}) |
| 415 | endif() | 415 | endif() |
| 416 | 416 | ||
| 417 | if(OPENSSLDIR STREQUAL "") | ||
| 418 | if(WIN32) | ||
| 419 | set(OPENSSLDIR "C:/Windows/libressl/ssl") | ||
| 420 | else() | ||
| 421 | set(OPENSSLDIR "${CMAKE_INSTALL_PREFIX}/etc/ssl") | ||
| 422 | endif() | ||
| 423 | |||
| 424 | set(CONF_DIR "${CMAKE_INSTALL_PREFIX}/etc/ssl") | ||
| 425 | else() | ||
| 426 | set(CONF_DIR "${OPENSSLDIR}") | ||
| 427 | endif() | ||
| 428 | |||
| 417 | add_subdirectory(include) | 429 | add_subdirectory(include) |
| 418 | add_subdirectory(crypto) | 430 | add_subdirectory(crypto) |
| 419 | add_subdirectory(ssl) | 431 | add_subdirectory(ssl) |
| @@ -495,12 +507,6 @@ if(ENABLE_LIBRESSL_INSTALL) | |||
| 495 | endif() | 507 | endif() |
| 496 | endif(ENABLE_LIBRESSL_INSTALL) | 508 | endif(ENABLE_LIBRESSL_INSTALL) |
| 497 | 509 | ||
| 498 | if(NOT "${OPENSSLDIR}" STREQUAL "") | ||
| 499 | set(CONF_DIR "${OPENSSLDIR}") | ||
| 500 | else() | ||
| 501 | set(CONF_DIR "${CMAKE_INSTALL_PREFIX}/etc/ssl") | ||
| 502 | endif() | ||
| 503 | |||
| 504 | if(ENABLE_LIBRESSL_INSTALL) | 510 | if(ENABLE_LIBRESSL_INSTALL) |
| 505 | install(FILES cert.pem openssl.cnf x509v3.cnf DESTINATION ${CONF_DIR}) | 511 | install(FILES cert.pem openssl.cnf x509v3.cnf DESTINATION ${CONF_DIR}) |
| 506 | install(DIRECTORY DESTINATION ${CONF_DIR}/certs) | 512 | install(DIRECTORY DESTINATION ${CONF_DIR}/certs) |
diff --git a/apps/nc/CMakeLists.txt b/apps/nc/CMakeLists.txt index ffd68e5..868b797 100644 --- a/apps/nc/CMakeLists.txt +++ b/apps/nc/CMakeLists.txt | |||
| @@ -29,11 +29,7 @@ else() | |||
| 29 | set(NC_SRC ${NC_SRC} compat/readpassphrase.c) | 29 | set(NC_SRC ${NC_SRC} compat/readpassphrase.c) |
| 30 | endif() | 30 | endif() |
| 31 | 31 | ||
| 32 | if(NOT "${OPENSSLDIR}" STREQUAL "") | 32 | add_definitions(-DDEFAULT_CA_FILE=\"${OPENSSLDIR}/cert.pem\") |
| 33 | add_definitions(-DDEFAULT_CA_FILE=\"${OPENSSLDIR}/cert.pem\") | ||
| 34 | else() | ||
| 35 | add_definitions(-DDEFAULT_CA_FILE=\"${CMAKE_INSTALL_PREFIX}/etc/ssl/cert.pem\") | ||
| 36 | endif() | ||
| 37 | 33 | ||
| 38 | add_executable(nc ${NC_SRC}) | 34 | add_executable(nc ${NC_SRC}) |
| 39 | target_include_directories(nc | 35 | target_include_directories(nc |
diff --git a/apps/ocspcheck/CMakeLists.txt b/apps/ocspcheck/CMakeLists.txt index 9cf7a8b..41c7845 100644 --- a/apps/ocspcheck/CMakeLists.txt +++ b/apps/ocspcheck/CMakeLists.txt | |||
| @@ -11,11 +11,7 @@ else() | |||
| 11 | set(OCSPCHECK_SRC ${OCSPCHECK_SRC} compat/memmem.c) | 11 | set(OCSPCHECK_SRC ${OCSPCHECK_SRC} compat/memmem.c) |
| 12 | endif() | 12 | endif() |
| 13 | 13 | ||
| 14 | if(NOT "${OPENSSLDIR}" STREQUAL "") | 14 | add_definitions(-DDEFAULT_CA_FILE=\"${OPENSSLDIR}/cert.pem\") |
| 15 | add_definitions(-DDEFAULT_CA_FILE=\"${OPENSSLDIR}/cert.pem\") | ||
| 16 | else() | ||
| 17 | add_definitions(-DDEFAULT_CA_FILE=\"${CMAKE_INSTALL_PREFIX}/etc/ssl/cert.pem\") | ||
| 18 | endif() | ||
| 19 | 15 | ||
| 20 | add_executable(ocspcheck ${OCSPCHECK_SRC}) | 16 | add_executable(ocspcheck ${OCSPCHECK_SRC}) |
| 21 | target_include_directories(ocspcheck | 17 | target_include_directories(ocspcheck |
diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt index 7efb143..6056471 100644 --- a/crypto/CMakeLists.txt +++ b/crypto/CMakeLists.txt | |||
| @@ -912,15 +912,7 @@ else() | |||
| 912 | endif() | 912 | endif() |
| 913 | endif() | 913 | endif() |
| 914 | 914 | ||
| 915 | if(NOT "${OPENSSLDIR}" STREQUAL "") | 915 | add_definitions(-DOPENSSLDIR=\"${OPENSSLDIR}\") |
| 916 | add_definitions(-DOPENSSLDIR=\"${OPENSSLDIR}\") | ||
| 917 | else() | ||
| 918 | if(WIN32) | ||
| 919 | add_definitions(-DOPENSSLDIR=\"C:/Windows/libressl/ssl\") | ||
| 920 | else() | ||
| 921 | add_definitions(-DOPENSSLDIR=\"${CMAKE_INSTALL_PREFIX}/etc/ssl\") | ||
| 922 | endif() | ||
| 923 | endif() | ||
| 924 | 916 | ||
| 925 | file(READ ${CMAKE_CURRENT_SOURCE_DIR}/crypto.sym SYMS) | 917 | file(READ ${CMAKE_CURRENT_SOURCE_DIR}/crypto.sym SYMS) |
| 926 | foreach(SYM IN LISTS CRYPTO_UNEXPORT) | 918 | foreach(SYM IN LISTS CRYPTO_UNEXPORT) |
diff --git a/tls/CMakeLists.txt b/tls/CMakeLists.txt index 240dbf8..077f5ee 100644 --- a/tls/CMakeLists.txt +++ b/tls/CMakeLists.txt | |||
| @@ -26,11 +26,7 @@ if(WIN32) | |||
| 26 | set(LIBTLS_EXTRA_EXPORT ${LIBTLS_EXTRA_EXPORT} ftruncate) | 26 | set(LIBTLS_EXTRA_EXPORT ${LIBTLS_EXTRA_EXPORT} ftruncate) |
| 27 | endif() | 27 | endif() |
| 28 | 28 | ||
| 29 | if(NOT "${OPENSSLDIR}" STREQUAL "") | 29 | add_definitions(-DTLS_DEFAULT_CA_FILE=\"${OPENSSLDIR}/cert.pem\") |
| 30 | add_definitions(-DTLS_DEFAULT_CA_FILE=\"${OPENSSLDIR}/cert.pem\") | ||
| 31 | else() | ||
| 32 | add_definitions(-DTLS_DEFAULT_CA_FILE=\"${CMAKE_INSTALL_PREFIX}/etc/ssl/cert.pem\") | ||
| 33 | endif() | ||
| 34 | 30 | ||
| 35 | file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/tls.sym DESTINATION | 31 | file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/tls.sym DESTINATION |
| 36 | ${CMAKE_CURRENT_BINARY_DIR}) | 32 | ${CMAKE_CURRENT_BINARY_DIR}) |
