aboutsummaryrefslogtreecommitdiffstats
path: root/src/conftest/conftest.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2010-12-23 15:00:34 +0100
committerMartin Willi <martin@revosec.ch>2011-01-05 16:46:07 +0100
commit97d30f0010528b0d7b7b7128e25d4585c11710ef (patch)
treefd3ff8652a9d030bc3f953c2a8eeeb2dcf31734c /src/conftest/conftest.c
parent7b3740d95845d35c6eacef1b01518d60f6ef350f (diff)
downloadstrongswan-97d30f0010528b0d7b7b7128e25d4585c11710ef.tar.bz2
strongswan-97d30f0010528b0d7b7b7128e25d4585c11710ef.tar.xz
Added support for OCSP responder URIs to conftest
Diffstat (limited to 'src/conftest/conftest.c')
-rw-r--r--src/conftest/conftest.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/conftest/conftest.c b/src/conftest/conftest.c
index e21914811..646359a9d 100644
--- a/src/conftest/conftest.c
+++ b/src/conftest/conftest.c
@@ -229,12 +229,21 @@ static void load_cdps(settings_t *settings)
enumerator_t *enumerator;
identification_t *id;
char *ca, *uri, *section;
+ certificate_type_t type;
x509_t *x509;
enumerator = settings->create_section_enumerator(settings, "cdps");
while (enumerator->enumerate(enumerator, &section))
{
- if (!strncaseeq(section, "crl", strlen("crl")))
+ if (strncaseeq(section, "crl", strlen("crl")))
+ {
+ type = CERT_X509_CRL;
+ }
+ else if (strncaseeq(section, "ocsp", strlen("ocsp")))
+ {
+ type = CERT_X509_OCSP_RESPONSE;
+ }
+ else
{
fprintf(stderr, "unknown cdp type '%s', ignored\n", section);
continue;
@@ -256,7 +265,7 @@ static void load_cdps(settings_t *settings)
}
id = identification_create_from_encoding(ID_KEY_ID,
x509->get_subjectKeyIdentifier(x509));
- conftest->creds->add_cdp(conftest->creds, CERT_X509_CRL, id, uri);
+ conftest->creds->add_cdp(conftest->creds, type, id, uri);
DESTROY_IF((certificate_t*)x509);
id->destroy(id);
}