Skip to content

Commit

Permalink
cmake: fix default TLS_DEFAULT_CA_FILE value in libtls for Windows
Browse files Browse the repository at this point in the history
Matching the logic used for `libcrypto` (and in autotools builds
for both `libcrypto` and `libtls`), set the default
`TLS_DEFAULT_CA_FILE` value to `C:/Windows/libressl/ssl/...`,
replacing the current, potentialy world-writable filename.
  • Loading branch information
vszakats committed Nov 4, 2023
1 parent e454895 commit e6ae33d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tls/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ endif()
if(NOT "${OPENSSLDIR}" STREQUAL "")
add_definitions(-DTLS_DEFAULT_CA_FILE=\"${OPENSSLDIR}/cert.pem\")
else()
add_definitions(-DTLS_DEFAULT_CA_FILE=\"${CMAKE_INSTALL_PREFIX}/etc/ssl/cert.pem\")
if(WIN32)
add_definitions(-DTLS_DEFAULT_CA_FILE=\"C:/Windows/libressl/ssl/cert.pem\")
else()
add_definitions(-DTLS_DEFAULT_CA_FILE=\"${CMAKE_INSTALL_PREFIX}/etc/ssl/cert.pem\")
endif()
endif()

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/tls.sym DESTINATION
Expand Down

0 comments on commit e6ae33d

Please sign in to comment.