/
ocsp_responders.h
76 lines (65 loc) · 2.11 KB
/
ocsp_responders.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*
* Copyright (C) 2023 Tobias Brunner
*
* Copyright (C) secunet Security Networks AG
*
* This program 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. See <http://www.fsf.org/copyleft/gpl.txt>.
*
* This program 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.
*/
/**
* @defgroup ocsp_responders ocsp_responders
* @{ @ingroup credentials
*/
#ifndef OCSP_RESPONDERS_H_
#define OCSP_RESPONDERS_H_
typedef struct ocsp_responders_t ocsp_responders_t;
#include <credentials/ocsp_responder.h>
/**
* Manages OCSP responders.
*/
struct ocsp_responders_t {
/**
* Check the status of a certificate given by its serial number
*
* @param cacert X.509 certificate of issuer CA
* @param serial_number serial number of the certificate to be checked
* @param revocation_time receives time of revocation, if revoked
* @param reason receives reason of revocation, if revoked
* @return certificate validation status
*/
cert_validation_t (*get_status)(ocsp_responders_t *this,
certificate_t *cacert,
chunk_t serial_number,
time_t *revocation_time,
crl_reason_t *revocation_reason);
/**
* Register an OCSP responder with this manager.
*
* @param responder OCSP responder to register
*/
void (*add_responder)(ocsp_responders_t *this,
ocsp_responder_t *responder);
/**
* Unregister an OCSP responder from this manager.
*
* @param responder OCSP responder to unregister
*/
void (*remove_responder)(ocsp_responders_t *this,
ocsp_responder_t *responder);
/**
* Destroy a ocsp_responders_t instance.
*/
void (*destroy)(ocsp_responders_t *this);
};
/**
* Create a ocsp_responders_t instance.
*/
ocsp_responders_t *ocsp_responders_create();
#endif /** OCSP_RESPONDERS_H_ @}*/