hx509_verify(3)
β¨ NAME β¨
hx509_verify β hx509 verification functions
π SYNOPSIS π
Functions
void hx509_context_set_missing_revoke (hx509_context context, int flag)
int hx509_verify_init_ctx (hx509_context context, hx509_verify_ctx *ctx)
void hx509_verify_destroy_ctx (hx509_verify_ctx ctx)
void hx509_verify_attach_anchors (hx509_verify_ctx ctx, hx509_certs set)
void hx509_verify_attach_revoke (hx509_verify_ctx ctx, hx509_revoke_ctx
revoke_ctx)
void hx509_verify_set_time (hx509_verify_ctx ctx, time_t t)
void hx509_verify_set_max_depth (hx509_verify_ctx ctx, unsigned int
max_depth)
void hx509_verify_set_proxy_certificate (hx509_verify_ctx ctx, int
boolean)
void hx509_verify_set_strict_rfc3280_verification (hx509_verify_ctx ctx,
int boolean)
int hx509_verify_path (hx509_context context, hx509_verify_ctx ctx,
hx509_cert cert, hx509_certs pool)
int hx509_ocsp_verify (hx509_context context, time_t now, hx509_cert
cert, int flags, const void *data, size_t length, time_t
*expiration)
int hx509_crl_alloc (hx509_context context, hx509_crl *crl)
int hx509_crl_add_revoked_certs (hx509_context context, hx509_crl crl,
hx509_certs certs)
int hx509_crl_lifetime (hx509_context context, hx509_crl crl, int delta)
void hx509_crl_free (hx509_context context, hx509_crl *crl)
int hx509_crl_sign (hx509_context context, hx509_cert signer, hx509_crl
crl, heim_octet_string *os)
π DETAILED DESCRIPTION π
okay so bestie... this section is literally empty in the original. No vibes, no notes, nothing. We move on. π
π₯ FUNCTION DOCUMENTATION π₯
void hx509_context_set_missing_revoke (hx509_context context, int flag)
Picks whether hx509_revoke_verify() is gonna demand that a revocation method (OCSP, CRL) actually exists, or whether it'll be chill about it. Heads up tho β hx509_verify_path(), hx509_cms_verify_signed(), and some other functions all call hx509_revoke_verify(), so this flag has reach. π
Parameters
contextβ the hx509 context you wanna flip the flag on.flagβ zero means a revocation method is required; non-zero means a missing revocation method is ok.
int hx509_crl_add_revoked_certs (hx509_context context, hx509_crl crl, hx509_certs certs)
Adds revoked certificates to a CRL context. Like, adding names to the naughty list. π«π
Parameters
contextβ a hx509 context.crlβ the CRL you're adding the revoked certificate to.certsβ keyset of certificate to revoke.
Returns
An hx509 error code, see hx509_get_error_string().
int hx509_crl_alloc (hx509_context context, hx509_crl * crl)
Makes a CRL context. And when you're done with it? Use hx509_crl_free() to free the CRL context, periodt.
Parameters
contextβ a hx509 context.crlβ return pointer to a newly allocated CRL context.
Returns
An hx509 error code, see hx509_get_error_string().
void hx509_crl_free (hx509_context context, hx509_crl * crl)
Frees a CRL context. Clean up after yourself bestie, it's giving self-care. π§ββοΈ
Parameters
contextβ a hx509 context.crlβ a CRL context to free.
int hx509_crl_lifetime (hx509_context context, hx509_crl crl, int delta)
Sets the lifetime of a CRL context. π°οΈ
Parameters
contextβ a hx509 context.crlβ a CRL contextdeltaβ delta time the certificate is valid, library adds the current time to this.
Returns
An hx509 error code, see hx509_get_error_string().
int hx509_crl_sign (hx509_context context, hx509_cert signer, hx509_crl crl, heim_octet_string * os)
Signs a CRL and hands you back an encode certificate. Slay. βοΈ
Parameters
contextβ a hx509 context.signerβ certificate to sign the CRL withcrlβ the CRL to signosβ return the signed and encoded CRL, free withfree_heim_octet_string()
Returns
An hx509 error code, see hx509_get_error_string().
int hx509_ocsp_verify (hx509_context context, time_t now, hx509_cert cert, int flags, const void * data, size_t length, time_t * expiration)
Verifies that the certificate is part of the OCSP reply and that it's not expired.
fr fr, important caveat: this does NOT verify the signature of the OCSP reply, and it does not check that it was done by an authorized sender. That's assumed to be already done. So don't come for this function with problems it never claimed to solve. π
Parameters
contextβ a hx509 contextnowβ the time right now, if 0, use the current time.certβ the certificate to verifyflagsβ flags control the behaviordataβ pointer to the encode ocsp replylengthβ the length of the encode ocsp replyexpirationβ return the time the OCSP will expire and need to be rechecked.
Returns
An hx509 error code, see hx509_get_error_string().
void hx509_verify_attach_anchors (hx509_verify_ctx ctx, hx509_certs set)
Sets the trust anchors in the verification context. It makes a reference to the keyset, so you can free the keyset independently of the destruction of the verification context (ctx). And if there's already a keyset attached? It gets released. Out with the old. π¦
Parameters
ctxβ a verification contextsetβ a keyset containing the trust anchors.
void hx509_verify_attach_revoke (hx509_verify_ctx ctx, hx509_revoke_ctx revoke_ctx)
Attaches a revocation context to the verification context. It makes a reference to the revoke context, so you can free the revoke context independently of the destruction of the verification context.
β οΈ If there is no revoke context, the verification process is NOT going to check any verification status. Not a drill.
Parameters
ctxβ a verification context.revoke_ctxβ a revoke context.
void hx509_verify_destroy_ctx (hx509_verify_ctx ctx)
Frees an hx509 verification context. Bye bestie, you did amazing. ππ
Parameters
ctxβ the context to be freed.
int hx509_verify_init_ctx (hx509_context context, hx509_verify_ctx * ctx)
Allocates a verification context, which is what you use to control the verification process. Main character energy for the whole verification pipeline ngl.
Parameters
contextβ A hx509 context.ctxβ returns a pointer to ahx509_verify_ctxobject.
Returns
An hx509 error code, see hx509_get_error_string().
int hx509_verify_path (hx509_context context, hx509_verify_ctx ctx, hx509_cert cert, hx509_certs pool)
Builds and verifies the path for the certificate to the trust anchor specified in the verify context. The path is constructed from the certificate, the pool, and the trust anchors. Chain building, but make it fashion. πβ¨
Parameters
contextβ A hx509 context.ctxβ A hx509 verification context.certβ the certificate to build the path from.poolβ A keyset of certificates to build the chain from.
Returns
An hx509 error code, see hx509_get_error_string().
void hx509_verify_set_max_depth (hx509_verify_ctx ctx, unsigned int max_depth)
Sets the maximum depth of the certificate chain that the path builder is going to try. How deep can we go?? π
Parameters
ctxβ a verification contextmax_depthβ maxium depth of the certificate chain, include trust anchor.
void hx509_verify_set_proxy_certificate (hx509_verify_ctx ctx, int boolean)
Allows or denies the use of proxy certificates. π
Parameters
ctxβ a verification contextbooleanβ if non zero, allow proxy certificates.
void hx509_verify_set_strict_rfc3280_verification (hx509_verify_ctx ctx, int boolean)
Selects strict RFC3280 verification of certificiates. This means checking key usage on CA certificates.
π¨ And the consequence? This will make version 1 certificiates unuseable. Yes, really. No cap.
Parameters
ctxβ a verification contextbooleanβ if non zero, use strict verification.
void hx509_verify_set_time (hx509_verify_ctx ctx, time_t t)
Sets the clock time that the verification process is going to use. It's for checking certificates in the past and future time. If you don't set it, the current time will be used. Time travel, but legal. β³π
Parameters
ctxβ a verification context.tβ the time the verifiation is using.
π AUTHOR π
Generated automatically by Doxygen for Heimdal x509 library from the source code. (Yes, a robot wrote it. We respect the robot. π«Ά)
and that's the whole page, bestie!! this absolute icon of a manpage is from Version 7.8.0, dated Tue Nov 15 2022, and it's the hx509_verify(3) page from the Heimdal x509 library. read it, love it, verify responsibly. πππ¦πΈπ
π
π¦ where this page comes from
- alpine 3.22: heimdal-doc 7.8.0-r4 Β· BSD-3-Clause
- alpine 3.23: heimdal-doc 7.8.0-r5 Β· BSD-3-Clause
- alpine 3.24: heimdal-doc 7.8.0-r5 Β· BSD-3-Clause
- epel 10: heimdal-devel 7.8.0-26.el10_2 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- epel 9: heimdal-devel 7.8.0-5.el9 Β· BSD and MIT
- fedora 43: heimdal-devel 7.8.0-26.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 43: heimdal-devel 7.8.0-26.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-26.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-26.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-28.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-28.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms