Andrew Boyson / crypto

Dependents:   oldheating gps motorhome heating

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?

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 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);