A simple library to support serving https.
Dependents: oldheating gps motorhome heating
tls/tls-session.h@2:82268409e83f, 2019-07-31 (annotated)
- Committer:
- andrewboyson
- Date:
- Wed Jul 31 15:12:34 2019 +0000
- Revision:
- 2:82268409e83f
- Child:
- 4:6a1d887f1cad
A lot of tidying. Not working yet.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
andrewboyson | 2:82268409e83f | 1 | #include <stdint.h> |
andrewboyson | 2:82268409e83f | 2 | |
andrewboyson | 2:82268409e83f | 3 | #define TLS_SESSION_STATE_NONE 0 |
andrewboyson | 2:82268409e83f | 4 | #define TLS_SESSION_STATE_STARTED 1 |
andrewboyson | 2:82268409e83f | 5 | #define TLS_SESSION_STATE_VALID 2 |
andrewboyson | 2:82268409e83f | 6 | |
andrewboyson | 2:82268409e83f | 7 | struct TlsSession |
andrewboyson | 2:82268409e83f | 8 | { |
andrewboyson | 2:82268409e83f | 9 | uint32_t lastUsed; |
andrewboyson | 2:82268409e83f | 10 | uint8_t state; |
andrewboyson | 2:82268409e83f | 11 | int slotPriKeyDecryption; |
andrewboyson | 2:82268409e83f | 12 | char clientRandom[32]; |
andrewboyson | 2:82268409e83f | 13 | char serverRandom[32]; |
andrewboyson | 2:82268409e83f | 14 | char masterSecret[48]; |
andrewboyson | 2:82268409e83f | 15 | }; |
andrewboyson | 2:82268409e83f | 16 | |
andrewboyson | 2:82268409e83f | 17 | extern struct TlsSession* TlsSessionGetOldest(void); |
andrewboyson | 2:82268409e83f | 18 | extern struct TlsSession* TlsSessionGetFromIndex(int sessionIndex); |
andrewboyson | 2:82268409e83f | 19 | extern int TlsSessionGetIndex(struct TlsSession* pSession); |