A simple library to support serving https.

Dependents:   oldheating gps motorhome heating

Revision:
2:82268409e83f
Child:
4:6a1d887f1cad
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tls/tls-session.h	Wed Jul 31 15:12:34 2019 +0000
@@ -0,0 +1,19 @@
+#include <stdint.h>
+
+#define TLS_SESSION_STATE_NONE    0
+#define TLS_SESSION_STATE_STARTED 1
+#define TLS_SESSION_STATE_VALID   2
+
+struct TlsSession
+{
+    uint32_t lastUsed;
+    uint8_t  state;
+    int  slotPriKeyDecryption;
+    char clientRandom[32];
+    char serverRandom[32];
+    char masterSecret[48];
+};
+
+extern struct TlsSession* TlsSessionGetOldest(void);
+extern struct TlsSession* TlsSessionGetFromIndex(int sessionIndex);
+extern int                TlsSessionGetIndex(struct TlsSession* pSession);
\ No newline at end of file