35#define TLS_CERT_CHAIN_MAX 10
65#define TLS_SCHEME_ED25519 0x0807
int tls_certverify_ed25519(wired_span sig, const u8 transcript_hash[32], const u8 pubkey[32])
Verify a server's CertificateVerify Ed25519 signature (RFC 8446 4.4.3).
int tls_cert_parse(wired_span buf, wired_span *context, tls_cert_entry *first)
Parse a Certificate message body (after the handshake header).
int tls_certverify_parse(wired_span buf, u16 *scheme, wired_span *sig)
Parse a CertificateVerify body: a 2-byte SignatureScheme then a 2-byte-length-prefixed signature.
int tls_cert_chain(wired_span buf, wired_span *context, const tls_cert_chain_out *out)
Parse a Certificate message body (after the handshake header) and view EVERY CertificateEntry's cert_...
Value-type views that fold the SDK's recurring argument shapes into single parameters,...
Destination for tls_cert_chain: entries[0..cap-1] and the count actually written.
Definition cert.h:39
usz cap
capacity of entries
Definition cert.h:41
usz * count
receives the number of entries written
Definition cert.h:42
tls_cert_entry * entries
receives the entry views, leaf first
Definition cert.h:40
A view of one CertificateEntry's cert_data within the message buffer.
Definition cert.h:15
u32 cert_len
length of cert_data in bytes
Definition cert.h:17
const u8 * cert_data
start of the entry's opaque cert_data (X.509)
Definition cert.h:16
Read-only view of a byte range.
Definition span.h:30
void transcript_hash(const transcript *t, u8 out[SHA256_DIGEST])
Running hash at the current point; t is left unchanged.
unsigned int u32
unsigned 32-bit integer
Definition types.h:15
u64 usz
unsigned size (size_t equivalent)
Definition types.h:20
unsigned short u16
unsigned 16-bit integer
Definition types.h:17
unsigned char u8
unsigned 8-bit integer / byte
Definition types.h:18