2010-06-09 16:53:51 +00:00
|
|
|
/* crlcache.h - LDAP access
|
2016-09-15 13:34:10 -04:00
|
|
|
* Copyright (C) 2002 Klarälvdalens Datakonsult AB
|
2010-06-09 16:53:51 +00:00
|
|
|
*
|
|
|
|
* This file is part of DirMngr.
|
|
|
|
*
|
|
|
|
* DirMngr is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* DirMngr is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CRLCACHE_H
|
|
|
|
#define CRLCACHE_H
|
|
|
|
|
|
|
|
|
2011-02-04 12:57:53 +01:00
|
|
|
typedef enum
|
2010-06-09 16:53:51 +00:00
|
|
|
{
|
2011-02-04 12:57:53 +01:00
|
|
|
CRL_CACHE_VALID = 0,
|
2010-06-09 16:53:51 +00:00
|
|
|
CRL_CACHE_INVALID,
|
|
|
|
CRL_CACHE_DONTKNOW,
|
2023-03-09 18:28:39 +01:00
|
|
|
CRL_CACHE_NOTTRUSTED,
|
2010-06-09 16:53:51 +00:00
|
|
|
CRL_CACHE_CANTUSE
|
|
|
|
}
|
|
|
|
crl_cache_result_t;
|
|
|
|
|
|
|
|
typedef enum foo
|
2011-02-04 12:57:53 +01:00
|
|
|
{
|
2010-06-09 16:53:51 +00:00
|
|
|
CRL_SIG_OK = 0,
|
|
|
|
CRL_SIG_NOT_OK,
|
|
|
|
CRL_TOO_OLD,
|
2011-02-04 12:57:53 +01:00
|
|
|
CRL_SIG_ERROR,
|
2010-06-09 16:53:51 +00:00
|
|
|
CRL_GENERAL_ERROR
|
|
|
|
}
|
|
|
|
crl_sig_result_t;
|
|
|
|
|
|
|
|
struct crl_cache_entry_s;
|
|
|
|
typedef struct crl_cache_entry_s *crl_cache_entry_t;
|
|
|
|
|
2023-03-16 14:52:28 +01:00
|
|
|
/*-- crlcache.c --*/
|
2010-06-09 16:53:51 +00:00
|
|
|
|
|
|
|
void crl_cache_init (void);
|
|
|
|
void crl_cache_deinit (void);
|
|
|
|
int crl_cache_flush(void);
|
|
|
|
|
|
|
|
crl_cache_result_t crl_cache_isvalid (ctrl_t ctrl,
|
|
|
|
const char *issuer_hash,
|
|
|
|
const char *cert_id,
|
|
|
|
int force_refresh);
|
|
|
|
|
|
|
|
gpg_error_t crl_cache_cert_isvalid (ctrl_t ctrl, ksba_cert_t cert,
|
|
|
|
int force_refresh);
|
|
|
|
|
|
|
|
gpg_error_t crl_cache_insert (ctrl_t ctrl, const char *url,
|
|
|
|
ksba_reader_t reader);
|
|
|
|
|
2010-07-16 13:19:45 +00:00
|
|
|
gpg_error_t crl_cache_list (estream_t fp);
|
2010-06-09 16:53:51 +00:00
|
|
|
|
|
|
|
gpg_error_t crl_cache_load (ctrl_t ctrl, const char *filename);
|
|
|
|
|
|
|
|
gpg_error_t crl_cache_reload_crl (ctrl_t ctrl, ksba_cert_t cert);
|
|
|
|
|
|
|
|
|
2023-03-16 14:52:28 +01:00
|
|
|
/*-- fakecrl.c --*/
|
2023-05-01 11:39:24 +09:00
|
|
|
gpg_error_t fakecrl_isvalid (ctrl_t ctrl,
|
|
|
|
const char *issuer_hash,
|
|
|
|
const char *cert_id);
|
2023-03-16 14:52:28 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-09 16:53:51 +00:00
|
|
|
#endif /* CRLCACHE_H */
|