Check that cert path flags are set before prepending an absolute path
@@ -55,13 +55,13 @@ endif()
# Set prefix to PWD if any path flags are relative
if(DEFINED ENV{PWD})
- if(NOT ROOT_CA_CERT_PATH MATCHES "/$")
+ if(ROOT_CA_CERT_PATH AND NOT ROOT_CA_CERT_PATH MATCHES "/$")
set(ROOT_CA_CERT_PATH "$ENV{PWD}/${ROOT_CA_CERT_PATH}")
endif()
- if(NOT CLIENT_CERT_PATH MATCHES "/$")
+ if(CLIENT_CERT_PATH AND NOT CLIENT_CERT_PATH MATCHES "/$")
set(CLIENT_CERT_PATH "$ENV{PWD}/${CLIENT_CERT_PATH}")
endif()
- if(NOT CLIENT_PRIVATE_KEY_PATH MATCHES "/$")
+ if(CLIENT_PRIVATE_KEY_PATH AND NOT CLIENT_PRIVATE_KEY_PATH MATCHES "/$")
set(CLIENT_PRIVATE_KEY_PATH "$ENV{PWD}/${CLIENT_PRIVATE_KEY_PATH}")
endif()
endif()
