From: Martin Willi Date: Tue, 9 Nov 2010 13:19:59 +0000 (+0100) Subject: Specify the type of the certificate to load, currently X509 only X-Git-Tag: 4.5.1~301 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a784c9e030876758de8bd9cd3714c6dc6dcde470;p=thirdparty%2Fstrongswan.git Specify the type of the certificate to load, currently X509 only --- diff --git a/src/conftest/conftest.c b/src/conftest/conftest.c index 0d610c5b4f..38ec833caa 100644 --- a/src/conftest/conftest.c +++ b/src/conftest/conftest.c @@ -110,6 +110,12 @@ static bool load_certs(settings_t *settings, char *dir) enumerator = settings->create_key_value_enumerator(settings, "certs.trusted"); while (enumerator->enumerate(enumerator, &key, &value)) { + if (!strcaseeq(key, "x509")) + { + fprintf(stderr, "certificate type '%s' not supported\n", key); + enumerator->destroy(enumerator); + return FALSE; + } cert = lib->creds->create(lib->creds, CRED_CERTIFICATE, CERT_X509, BUILD_FROM_FILE, value, BUILD_END); if (!cert) @@ -126,6 +132,12 @@ static bool load_certs(settings_t *settings, char *dir) enumerator = settings->create_key_value_enumerator(settings, "certs.untrusted"); while (enumerator->enumerate(enumerator, &key, &value)) { + if (!strcaseeq(key, "x509")) + { + fprintf(stderr, "certificate type '%s' not supported\n", key); + enumerator->destroy(enumerator); + return FALSE; + } cert = lib->creds->create(lib->creds, CRED_CERTIFICATE, CERT_X509, BUILD_FROM_FILE, value, BUILD_END); if (!cert)