A simple library to support serving https.

Dependents:   oldheating gps motorhome heating

Committer:
andrewboyson
Date:
Wed Aug 28 07:10:59 2019 +0000
Revision:
5:ee5489ee1117
Parent:
4:6a1d887f1cad
Child:
6:819c17738dc2
Added connection status

Who changed what in which revision?

UserRevisionLine numberNew 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 5:ee5489ee1117 19 extern struct TlsSession* TlsSessionGetOldest(void); //Never fails so never returns NULL
andrewboyson 5:ee5489ee1117 20 extern struct TlsSession* TlsSessionOrNull(int sessionIndex); //Returns NULL if not found
andrewboyson 2:82268409e83f 21 extern int TlsSessionGetIndex(struct TlsSession* pSession);