aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2007-07-04 12:00:33 +0000
committerMartin Willi <martin@strongswan.org>2007-07-04 12:00:33 +0000
commitfa1bd44f2339bdb1ce835da9315ce59214ddfe83 (patch)
tree54ad2f476df542a790accb003f6d9d33a5cba7a8
parent1b8da8491386cd2439975f7c9a499ad15848a1b3 (diff)
downloadstrongswan-fa1bd44f2339bdb1ce835da9315ce59214ddfe83.tar.bz2
strongswan-fa1bd44f2339bdb1ce835da9315ce59214ddfe83.tar.xz
ignoring unkown crl/ocsp uris
-rw-r--r--src/charon/config/credentials/local_credential_store.c10
-rw-r--r--src/libstrongswan/crypto/ca.c12
2 files changed, 17 insertions, 5 deletions
diff --git a/src/charon/config/credentials/local_credential_store.c b/src/charon/config/credentials/local_credential_store.c
index 6964345b3..649fcbcfb 100644
--- a/src/charon/config/credentials/local_credential_store.c
+++ b/src/charon/config/credentials/local_credential_store.c
@@ -456,7 +456,10 @@ static void add_uris(ca_info_t *issuer, x509_t *cert)
while (iterator->iterate(iterator, (void**)&uri))
{
- issuer->add_crluri(issuer, uri->get_encoding(uri));
+ if (uri->get_type(uri) == ID_DER_ASN1_GN_URI)
+ {
+ issuer->add_crluri(issuer, uri->get_encoding(uri));
+ }
}
iterator->destroy(iterator);
@@ -465,7 +468,10 @@ static void add_uris(ca_info_t *issuer, x509_t *cert)
while (iterator->iterate(iterator, (void**)&uri))
{
- issuer->add_ocspuri(issuer, uri->get_encoding(uri));
+ if (uri->get_type(uri) == ID_DER_ASN1_GN_URI)
+ {
+ issuer->add_ocspuri(issuer, uri->get_encoding(uri));
+ }
}
iterator->destroy(iterator);
}
diff --git a/src/libstrongswan/crypto/ca.c b/src/libstrongswan/crypto/ca.c
index 07413e805..97c184bb8 100644
--- a/src/libstrongswan/crypto/ca.c
+++ b/src/libstrongswan/crypto/ca.c
@@ -345,7 +345,7 @@ static void add_crluri(private_ca_info_t *this, chunk_t uri)
strncasecmp(uri.ptr, "file", 4) != 0 &&
strncasecmp(uri.ptr, "ftp", 3) != 0))
{
- DBG1(" invalid crl uri '%#B'", uri);
+ DBG1(" invalid crl uri '%#B'", &uri);
return;
}
else
@@ -399,7 +399,10 @@ void add_info (private_ca_info_t *this, const private_ca_info_t *that)
while (iterator->iterate(iterator, (void**)&uri))
{
- add_crluri(this, uri->get_encoding(uri));
+ if (uri->get_type(uri) == ID_DER_ASN1_GN_URI)
+ {
+ add_crluri(this, uri->get_encoding(uri));
+ }
}
iterator->destroy(iterator);
}
@@ -411,7 +414,10 @@ void add_info (private_ca_info_t *this, const private_ca_info_t *that)
while (iterator->iterate(iterator, (void**)&uri))
{
- add_ocspuri(this, uri->get_encoding(uri));
+ if (uri->get_type(uri) == ID_DER_ASN1_GN_URI)
+ {
+ add_ocspuri(this, uri->get_encoding(uri));
+ }
}
iterator->destroy(iterator);
}