4#ifndef PROTOCORE_TLS13_RPK_H
5#define PROTOCORE_TLS13_RPK_H
33#define PROTOCORE_TLS13_ED25519_SPKI_LEN 44
38 size_t (*ed25519_spki)(uint8_t *, uint8_t *, size_t,
const uint8_t *);
39 proto_bool (*ed25519_from_spki)(uint8_t *,
const uint8_t *, size_t,
const uint8_t **);
40 size_t (*build_certificate)(uint8_t *, uint8_t *, size_t,
const uint8_t *);
#define PROTOCORE_NS_LAYOUT(T,...)
Pin every dispatch slot of a table that is nothing but function pointers.
#define PROTOCORE_NS
Storage for a dispatch table. The const is load bearing.
Dispatch table. Addressed by offset, so the layout is asserted below.
size_t(* ed25519_spki)(uint8_t *, uint8_t *, size_t, const uint8_t *)
PROTOCORE_NS Tls13RpkNs Tls13Rpk PROTOCORE_UNUSED
Module namespace.
size_t protocore_tls13_rpk_build_certificate(uint8_t *work, uint8_t *out, size_t cap, const uint8_t *ed25519_pub)
Build a Certificate message (RFC 8446 sec 4.4.2) carrying an RFC .
size_t protocore_tls13_rpk_ed25519_spki(uint8_t *work, uint8_t *out, size_t cap, const uint8_t *pub)
Write the 44-byte DER SubjectPublicKeyInfo for the Ed25519 key pub .
proto_bool protocore_tls13_rpk_ed25519_from_spki(uint8_t *work, const uint8_t *spki, size_t len, const uint8_t **pub)
The 32-byte Ed25519 key inside a DER SubjectPublicKeyInfo (RFC 8410 .
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
_Bool proto_bool
The truth value.
#define PROTOCORE_END_DECLS