2 * Copyright (C) 2008 Martin Willi
3 * Hochschule fuer Technik Rapperswil
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 * @defgroup cert_cache cert_cache
24 #include <credentials/credential_set.h>
26 typedef struct cert_cache_t cert_cache_t
;
29 * Certificate signature verification and certificate cache.
31 * This cache serves all certificates seen in its issued_by method
32 * and serves them as untrusted through the credential set interface. Further,
33 * it caches valid subject-issuer relationships to speed up the issued_by
39 * Implements credential_set_t.
44 * Caching wrapper around certificate_t.issued_by.
46 * @param subject certificate to verify
47 * @param issuer issuing certificate to verify subject
48 * @return TRUE if subject issued by issuer
50 bool (*issued_by
)(cert_cache_t
*this,
51 certificate_t
*subject
, certificate_t
*issuer
);
54 * Flush the certificate cache.
56 * @param type type of certificate to flush, or CERT_ANY
58 void (*flush
)(cert_cache_t
*this, certificate_type_t type
);
61 * Destroy a cert_cache instance.
63 void (*destroy
)(cert_cache_t
*this);
67 * Create a cert_cache instance.
69 cert_cache_t
*cert_cache_create();
71 #endif /** CERT_CACHE_H_ @}*/