Andrew Boyson / crypto

Dependents:   oldheating gps motorhome heating

Revision:
6:819c17738dc2
Parent:
5:ee5489ee1117
Child:
8:5e66a6b4b38c
diff -r ee5489ee1117 -r 819c17738dc2 tls/tls-connection.c
--- a/tls/tls-connection.c	Wed Aug 28 07:10:59 2019 +0000
+++ b/tls/tls-connection.c	Sun Sep 01 18:15:12 2019 +0000
@@ -14,6 +14,11 @@
     p->toDo     = 0;
     p->session  = 0;
     Sha256Start(&p->handshakeHash); //This just clears any information previously calculated
+    p->clientEncrypted = false;
+    p->serverEncrypted = false;
+    for (int i = 0; i < TLS_RANDOM_SIZE; i++) p->clientRandom[i] = 0;
+    for (int i = 0; i < TLS_RANDOM_SIZE; i++) p->serverRandom[i] = 0;
+    for (int i = 0; i < TLS_VERIFY_SIZE; i++) p->clientVerify[i] = 0;
 }
 
 struct TlsConnection* TlsConnectionNew(int connectionId) //Never fails so never returns NULL