keyhole logo

Functions
hx509 revokation checking functions

Functions

int hx509_revoke_init (hx509_context context, hx509_revoke_ctx *ctx)
 
void hx509_revoke_free (hx509_revoke_ctx *ctx)
 
int hx509_revoke_add_ocsp (hx509_context context, hx509_revoke_ctx ctx, const char *path)
 
int hx509_revoke_add_crl (hx509_context context, hx509_revoke_ctx ctx, const char *path)
 
int hx509_revoke_verify (hx509_context context, hx509_revoke_ctx ctx, hx509_certs certs, time_t now, hx509_cert cert, hx509_cert parent_cert)
 
int hx509_ocsp_request (hx509_context context, hx509_certs reqcerts, hx509_certs pool, hx509_cert signer, const AlgorithmIdentifier *digest, heim_octet_string *request, heim_octet_string *nonce)
 
int hx509_revoke_ocsp_print (hx509_context context, const char *path, FILE *out)
 

Detailed Description

See the Revocation methods for description and examples.

Function Documentation

◆ hx509_ocsp_request()

int hx509_ocsp_request ( hx509_context  context,
hx509_certs  reqcerts,
hx509_certs  pool,
hx509_cert  signer,
const AlgorithmIdentifier *  digest,
heim_octet_string *  request,
heim_octet_string *  nonce 
)

Create an OCSP request for a set of certificates.

Parameters
contexta hx509 context
reqcertslist of certificates to request ocsp data for
poolcertificate pool to use when signing
signercertificate to use to sign the request
digestthe signing algorithm in the request, if NULL use the default signature algorithm,
requestthe encoded request, free with free_heim_octet_string().
noncenonce in the request, free with free_heim_octet_string().
Returns
An hx509 error code, see hx509_get_error_string().

◆ hx509_revoke_add_crl()

int hx509_revoke_add_crl ( hx509_context  context,
hx509_revoke_ctx  ctx,
const char *  path 
)

Add a CRL file to the revokation context.

Parameters
contexthx509 context
ctxhx509 revokation context
pathpath to file that is going to be added to the context.
Returns
An hx509 error code, see hx509_get_error_string().

◆ hx509_revoke_add_ocsp()

int hx509_revoke_add_ocsp ( hx509_context  context,
hx509_revoke_ctx  ctx,
const char *  path 
)

Add a OCSP file to the revokation context.

Parameters
contexthx509 context
ctxhx509 revokation context
pathpath to file that is going to be added to the context.
Returns
An hx509 error code, see hx509_get_error_string().

◆ hx509_revoke_free()

void hx509_revoke_free ( hx509_revoke_ctx *  ctx)

Free a hx509 revokation context.

Parameters
ctxcontext to be freed

◆ hx509_revoke_init()

int hx509_revoke_init ( hx509_context  context,
hx509_revoke_ctx *  ctx 
)

Allocate a revokation context. Free with hx509_revoke_free().

Parameters
contextA hx509 context.
ctxreturns a newly allocated revokation context.
Returns
An hx509 error code, see hx509_get_error_string().

◆ hx509_revoke_ocsp_print()

int hx509_revoke_ocsp_print ( hx509_context  context,
const char *  path,
FILE *  out 
)

Print the OCSP reply stored in a file.

Parameters
contexta hx509 context
pathpath to a file with a OCSP reply
outthe out FILE descriptor to print the reply on
Returns
An hx509 error code, see hx509_get_error_string().

◆ hx509_revoke_verify()

int hx509_revoke_verify ( hx509_context  context,
hx509_revoke_ctx  ctx,
hx509_certs  certs,
time_t  now,
hx509_cert  cert,
hx509_cert  parent_cert 
)

Check that a certificate is not expired according to a revokation context. Also need the parent certificte to the check OCSP parent identifier.

Parameters
contexthx509 context
ctxhx509 revokation context
certs
now
cert
parent_cert
Returns
An hx509 error code, see hx509_get_error_string().

Generated on Tue Nov 15 2022 14:04:25 for Heimdal x509 library by doxygen 1.9.1