Add a cert_validator hook allowing plugins to provide custom lifetime checking
This commit is contained in:
@@ -34,6 +34,22 @@ typedef struct cert_validator_t cert_validator_t;
|
||||
*/
|
||||
struct cert_validator_t {
|
||||
|
||||
/**
|
||||
* Check the lifetime of a certificate.
|
||||
*
|
||||
* If this function returns SUCCESS or FAILED, the certificate lifetime is
|
||||
* considered definitely (in-)valid, without asking other validators.
|
||||
* If all registered validaters return NEED_MORE, the default
|
||||
* lifetime check is performed.
|
||||
*
|
||||
* @param cert certificate to check lifetime
|
||||
* @param pathlen the current length of the path bottom-up
|
||||
* @param anchor is certificate trusted root anchor?
|
||||
* @param auth container for resulting authentication info
|
||||
* @return SUCCESS, FAILED or NEED_MORE to ask next validator
|
||||
*/
|
||||
status_t (*check_lifetime)(cert_validator_t *this, certificate_t *cert,
|
||||
int pathlen, bool anchor, auth_cfg_t *auth);
|
||||
/**
|
||||
* Validate a subject certificate in relation to its issuer.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user