21 #define OCSP_ENABLED 1 23 #define OCSP_ENABLED 0 27 #define OCSP_ALGORITHM_IDENTIFIER( ... ) \ 28 ASN1_OID, VA_ARG_COUNT ( __VA_ARGS__ ), __VA_ARGS__, \ 32 #define OCSP_STATUS_SUCCESSFUL 0x00 33 #define OCSP_STATUS_MALFORMED_REQUEST 0x01 34 #define OCSP_STATUS_INTERNAL_ERROR 0x02 35 #define OCSP_STATUS_TRY_LATER 0x03 36 #define OCSP_STATUS_SIG_REQUIRED 0x05 37 #define OCSP_STATUS_UNAUTHORIZED 0x06 struct asn1_cursor id
Responder ID.
An ASN.1 OID-identified algorithm.
int ocsp_response(struct ocsp_check *ocsp, const void *data, size_t len)
Receive OCSP response.
int good
OCSP status is good.
time_t next_update
Time at which newer status information will be available.
struct x509_certificate * signer
Signing certificate.
struct refcnt refcnt
Reference count.
struct ocsp_response response
Response.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
struct x509_certificate * cert
Certificate being checked.
static struct ocsp_check * ocsp_get(struct ocsp_check *ocsp)
Get reference to OCSP check.
struct asn1_algorithm * algorithm
Signature algorithm.
static int ocsp_required(struct x509_certificate *cert)
Check if X.509 certificate requires an OCSP check.
size_t len
Length of data.
struct asn1_bit_string signature
Signature value.
struct asn1_cursor cert_id_tail
Certificate ID (excluding hashAlgorithm)
struct asn1_cursor tbs
Raw tbsResponseData.
struct x509_authority_info_access auth_info
Authority information access.
int ocsp_validate(struct ocsp_check *check, time_t time)
Validate OCSP response.
struct asn1_cursor uri
URI.
int(* compare)(struct ocsp_check *ocsp, struct x509_certificate *cert)
Check if certificate is the responder's certificate.
struct x509_certificate * issuer
Issuing certificate.
#define ref_get(refcnt)
Get additional reference to object.
static void ocsp_put(struct ocsp_check *ocsp)
Drop reference to OCSP check.
time_t this_update
Time at which status is known to be correct.
struct ocsp_request request
Request.
Cryptographic configuration.
uint8_t data[48]
Additional event data.
struct ocsp_responder responder
Responder.
int ocsp_check(struct x509_certificate *cert, struct x509_certificate *issuer, struct ocsp_check **ocsp)
Create OCSP check.
int64_t time_t
Seconds since the Epoch.
struct x509_ocsp_responder ocsp
OCSP responder.
struct asn1_builder builder
Request builder.
struct x509_extensions extensions
Extensions.
#define ref_put(refcnt)
Drop reference to object.
char * uri_string
URI string.