A simple library to support serving https.
Dependents: oldheating gps motorhome heating
tls/tls-session.h
- Committer:
- andrewboyson
- Date:
- 2020-04-01
- Revision:
- 24:cb43290fc439
- Parent:
- 14:03a0b8fd6ddc
File content as of revision 24:cb43290fc439:
#include <stdint.h> #include "sha256.h" #define TLS_KEY_SIZE_MASTER 48 struct TlsSession { uint32_t id; uint32_t lastUsed; bool valid; uint8_t masterSecret [TLS_KEY_SIZE_MASTER]; }; extern struct TlsSession* TlsSessionNew (void); //Never fails so never returns NULL extern struct TlsSession* TlsSessionOrNull(uint32_t id); //Returns NULL if not found extern void TlsSessionReset (uint32_t id);