|
ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
|
The RFC 7250 RawPublicKey credential a TLS 1.3 Certificate message carries. More...
#include "protocore_config.h"Go to the source code of this file.
Classes | |
| struct | Tls13RpkNs |
| Dispatch table. Addressed by offset, so the layout is asserted below. More... | |
Macros | |
| #define | PROTOCORE_TLS13_ED25519_SPKI_LEN 44 |
| DER SubjectPublicKeyInfo for an Ed25519 key (RFC 8410 sec 4) | |
Functions | |
| PROTOCORE_NS_LAYOUT (Tls13RpkNs, ed25519_spki, ed25519_from_spki, build_certificate) | |
| 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 . | |
| 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 . | |
Variables | |
| PROTOCORE_NS Tls13RpkNs Tls13Rpk | PROTOCORE_UNUSED |
| Module namespace. | |
The RFC 7250 RawPublicKey credential a TLS 1.3 Certificate message carries.
A RawPublicKey Certificate carries a bare DER SubjectPublicKeyInfo where an X.509 chain would go (RFC 7250 sec 3). This module is that credential: the Ed25519 SubjectPublicKeyInfo of RFC 8410 sec 4 in both directions, and the Certificate message built over it. The messages themselves, the server_certificate_type extension that selects this credential, and the handshake that negotiates it are tls13_msg's.
work is bytes the CALLER holds. This module reads none of them: it carries nothing between calls, so there is no state to keep and nothing to wipe. The parameter is there so a caller drives every namespace the same way.
Definition in file tls13_rpk.h.
| #define PROTOCORE_TLS13_ED25519_SPKI_LEN 44 |
DER SubjectPublicKeyInfo for an Ed25519 key (RFC 8410 sec 4)
Definition at line 33 of file tls13_rpk.h.
| PROTOCORE_NS_LAYOUT | ( | Tls13RpkNs | , |
| ed25519_spki | , | ||
| ed25519_from_spki | , | ||
| build_certificate | |||
| ) |
| 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 .
| work | PROTOCORE_TLS13_RPK_BORROW bytes the caller took. Not held past the call. |
| out | Out |
| cap | Cap |
| pub | 32 bytes |
| 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 .
| work | PROTOCORE_TLS13_RPK_BORROW bytes the caller took. Not held past the call. |
| spki | Spki |
| len | Len |
| pub | Pub |
| 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 .
| work | PROTOCORE_TLS13_RPK_BORROW bytes the caller took. Not held past the call. |
| out | Out |
| cap | Cap |
| ed25519_pub | 32 bytes |
| PROTOCORE_NS Tls13RpkNs Tls13Rpk PROTOCORE_UNUSED |
Module namespace.
Definition at line 73 of file tls13_rpk.h.