Do not use certs in container for testing.
The certs are available in test/certificate so it makes more sense to use them there. In addition the container does not need to be rebuilt unless the CA cert changes.
@@ -44,9 +44,6 @@ typedef enum
Constants
***********************************************************************************************************************************/
#define HRN_SERVER_HOST "tls.test.pgbackrest.org"
-#define HRN_SERVER_FAKE_CERT_PATH "/etc/fake-cert"
-#define HRN_SERVER_FAKE_KEY_FILE HRN_SERVER_FAKE_CERT_PATH "/pgbackrest-test.key"
-#define HRN_SERVER_FAKE_CERT_FILE HRN_SERVER_FAKE_CERT_PATH "/pgbackrest-test.crt"
/***********************************************************************************************************************************
Send commands to the server
@@ -239,20 +236,10 @@ void hrnServerRun(IoRead *read, HrnServerProtocol protocol, HrnServerRunParam pa
// If certificate and key are not set then use defaults
if (param.certificate == NULL)
- {
- // If running in a container use the installed certificate
- if (testContainer())
- {
- param.certificate = strNewZ(HRN_SERVER_FAKE_CERT_FILE);
- param.key = strNewZ(HRN_SERVER_FAKE_KEY_FILE);
- }
- // Else use a certificate from the test path -- tests will need to disable verify
- else
{
param.certificate = strNewFmt("%s/" HRN_SERVER_CERT_PREFIX ".crt", hrnPathRepo());
param.key = strNewFmt("%s/" HRN_SERVER_CERT_PREFIX ".key", hrnPathRepo());
}
- }
// Initialize TLS
cryptoInit();
