A simple library to support serving https.

Dependents:   oldheating gps motorhome heating

Revision:
6:819c17738dc2
Parent:
5:ee5489ee1117
Child:
8:5e66a6b4b38c
--- a/tls/tls-session.h	Wed Aug 28 07:10:59 2019 +0000
+++ b/tls/tls-session.h	Sun Sep 01 18:15:12 2019 +0000
@@ -6,16 +6,17 @@
 #define TLS_SESSION_STATE_STARTED 1
 #define TLS_SESSION_STATE_VALID   2
 
+#define TLS_KEY_SIZE_MASTER 48
+
 struct TlsSession
 {
     uint32_t            lastUsed;
     uint8_t             state;
+    
     int                 slotPriKeyDecryption;
-    uint8_t             clientRandom [32];
-    uint8_t             serverRandom [32];
-    uint8_t             masterSecret [48];
+    uint8_t             masterSecret  [TLS_KEY_SIZE_MASTER];
 };
 
-extern struct TlsSession* TlsSessionGetOldest(void); //Never fails so never returns NULL
-extern struct TlsSession* TlsSessionOrNull(int sessionIndex); //Returns NULL if not found
-extern int                TlsSessionGetIndex(struct TlsSession* pSession);
\ No newline at end of file
+extern struct TlsSession* TlsSessionGetOldest(void);             //Never fails so never returns NULL
+extern struct TlsSession* TlsSessionOrNull   (int sessionIndex); //Returns NULL if not found
+extern int                TlsSessionGetIndex (struct TlsSession* pSession);
\ No newline at end of file