25#ifndef NETSURF_SSL_CERTS_H_
26#define NETSURF_SSL_CERTS_H_
51#define SSL_CERT_ERR_MAX_KNOWN SSL_CERT_ERR_HOSTNAME_MISMATCH
54#define MAX_CERT_DEPTH 10
nserror
Enumeration of error codes.
struct nsurl nsurl
NetSurf URL object.
nserror cert_chain_from_query(struct nsurl *url, struct cert_chain **chain_out)
create a certificate chain from a fetch query string
nserror cert_chain_alloc(size_t depth, struct cert_chain **chain_out)
create new certificate chain
ssl_cert_err
ssl certificate error status
@ SSL_CERT_ERR_TOO_YOUNG
This certificate is not yet valid.
@ SSL_CERT_ERR_BAD_SIG
Bad signature on this certificate.
@ SSL_CERT_ERR_BAD_ISSUER
Bad issuer.
@ SSL_CERT_ERR_SELF_SIGNED
This certificate (or the chain) is self signed.
@ SSL_CERT_ERR_OK
Nothing wrong with this certificate.
@ SSL_CERT_ERR_HOSTNAME_MISMATCH
This certificate host did not match the server.
@ SSL_CERT_ERR_TOO_OLD
This certificate is no longer valid.
@ SSL_CERT_ERR_REVOKED
This certificate has been revoked.
@ SSL_CERT_ERR_CHAIN_SELF_SIGNED
This certificate chain is self signed.
@ SSL_CERT_ERR_CERT_MISSING
This certificate was missing from the chain, its data is useless.
@ SSL_CERT_ERR_UNKNOWN
Unknown error.
nserror cert_chain_dup_into(const struct cert_chain *src, struct cert_chain *dst)
duplicate a certificate chain into an existing chain
nserror cert_chain_dup(const struct cert_chain *src, struct cert_chain **dst_out)
duplicate a certificate chain
nserror cert_chain_free(struct cert_chain *chain)
free a certificate chain
#define MAX_CERT_DEPTH
maximum number of X509 certificates in chain for TLS connection
size_t cert_chain_size(const struct cert_chain *chain)
total number of data bytes in a chain
nserror cert_chain_to_query(struct cert_chain *chain, struct nsurl **url_out)
create a fetch query string from a certificate chain
struct cert_chain::@57 certs[MAX_CERT_DEPTH]
size_t depth
the number of certificates in the chain
uint8_t * der
data in Distinguished Encoding Rules (DER) format
size_t der_length
DER length.
ssl_cert_err err
Whatever is wrong with this certificate.