Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: oldheating gps motorhome heating
tls/tls-session.h@4:6a1d887f1cad, 2019-08-20 (annotated)
- Committer:
- andrewboyson
- Date:
- Tue Aug 20 14:50:48 2019 +0000
- Revision:
- 4:6a1d887f1cad
- Parent:
- 2:82268409e83f
- Child:
- 5:ee5489ee1117
Continued work to implement TLS
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 | 4:6a1d887f1cad | 3 | #include "sha256.h" |
| andrewboyson | 4:6a1d887f1cad | 4 | |
| andrewboyson | 2:82268409e83f | 5 | #define TLS_SESSION_STATE_NONE 0 |
| andrewboyson | 2:82268409e83f | 6 | #define TLS_SESSION_STATE_STARTED 1 |
| andrewboyson | 2:82268409e83f | 7 | #define TLS_SESSION_STATE_VALID 2 |
| andrewboyson | 2:82268409e83f | 8 | |
| andrewboyson | 2:82268409e83f | 9 | struct TlsSession |
| andrewboyson | 2:82268409e83f | 10 | { |
| andrewboyson | 4:6a1d887f1cad | 11 | uint32_t lastUsed; |
| andrewboyson | 4:6a1d887f1cad | 12 | uint8_t state; |
| andrewboyson | 4:6a1d887f1cad | 13 | int slotPriKeyDecryption; |
| andrewboyson | 4:6a1d887f1cad | 14 | uint8_t clientRandom [32]; |
| andrewboyson | 4:6a1d887f1cad | 15 | uint8_t serverRandom [32]; |
| andrewboyson | 4:6a1d887f1cad | 16 | uint8_t masterSecret [48]; |
| andrewboyson | 2:82268409e83f | 17 | }; |
| andrewboyson | 2:82268409e83f | 18 | |
| andrewboyson | 2:82268409e83f | 19 | extern struct TlsSession* TlsSessionGetOldest(void); |
| andrewboyson | 2:82268409e83f | 20 | extern struct TlsSession* TlsSessionGetFromIndex(int sessionIndex); |
| andrewboyson | 2:82268409e83f | 21 | extern int TlsSessionGetIndex(struct TlsSession* pSession); |