aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/crypto/crl.c
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2007-04-03 21:09:11 +0000
committerAndreas Steffen <andreas.steffen@strongswan.org>2007-04-03 21:09:11 +0000
commita8f02ad5f5f9a15c22cc2371818022a3c1b5e41c (patch)
tree46d7f9d6f37e91de6e144950f77d65314e63c7ac /src/libstrongswan/crypto/crl.c
parentf166af2c0a6503a1304e79d8c169ade35e9ebfb6 (diff)
downloadstrongswan-a8f02ad5f5f9a15c22cc2371818022a3c1b5e41c.tar.bz2
strongswan-a8f02ad5f5f9a15c22cc2371818022a3c1b5e41c.tar.xz
implemented dynamic http-based CRL fetching
Diffstat (limited to 'src/libstrongswan/crypto/crl.c')
-rwxr-xr-xsrc/libstrongswan/crypto/crl.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/libstrongswan/crypto/crl.c b/src/libstrongswan/crypto/crl.c
index 685ccfc8a..0b9fdaf4f 100755
--- a/src/libstrongswan/crypto/crl.c
+++ b/src/libstrongswan/crypto/crl.c
@@ -311,7 +311,7 @@ bool parse_x509crl(chunk_t blob, u_int level0, private_crl_t *crl)
/**
* Implements crl_t.is_valid
*/
-static err_t is_valid(const private_crl_t *this, time_t *until, bool strict)
+static bool is_valid(const private_crl_t *this)
{
time_t current_time = time(NULL);
@@ -319,17 +319,7 @@ static err_t is_valid(const private_crl_t *this, time_t *until, bool strict)
DBG2(" current time: %T", &current_time);
DBG2(" next update: %T", &this->nextUpdate);
- if (strict && until != NULL &&
- (*until == UNDEFINED_TIME || this->nextUpdate < *until))
- {
- *until = this->nextUpdate;
- }
- if (current_time > this->nextUpdate)
- {
- return "has expired";
- }
- DBG2(" crl is valid");
- return NULL;
+ return current_time < this->nextUpdate;
}
/**
@@ -499,7 +489,7 @@ crl_t *crl_create_from_chunk(chunk_t chunk)
this->public.get_issuer = (identification_t* (*) (const crl_t*))get_issuer;
this->public.equals_issuer = (bool (*) (const crl_t*,const crl_t*))equals_issuer;
this->public.is_issuer = (bool (*) (const crl_t*,const x509_t*))is_issuer;
- this->public.is_valid = (err_t (*) (const crl_t*,time_t*,bool))is_valid;
+ this->public.is_valid = (bool (*) (const crl_t*))is_valid;
this->public.is_newer = (bool (*) (const crl_t*,const crl_t*))is_newer;
this->public.verify = (bool (*) (const crl_t*,const rsa_public_key_t*))verify;
this->public.get_status = (void (*) (const crl_t*,certinfo_t*))get_status;