Dependencies:   net 1-wire lpc1768 crypto clock web fram log

/media/uploads/andrewboyson/heating.sch

/media/uploads/andrewboyson/heating.brd

/media/uploads/andrewboyson/eagle.epf

Revision:
80:99140e224bd7
Parent:
78:2c339a59be46
--- a/web-this/system/web-system-html.c	Sun Oct 06 08:01:14 2019 +0000
+++ b/web-this/system/web-system-html.c	Mon Oct 21 14:36:09 2019 +0000
@@ -10,7 +10,7 @@
 #include "sha256.h"
 #include "hmac-sha256.h"
 #include "tls-prf.h"
-#include "aes128.h"
+#include "aes128cbc.h"
 #include "sha1.h"
 #include "pri-key.h"
 
@@ -48,10 +48,8 @@
                       0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11, 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef,
                       0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17, 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10 };
     */
-    struct AES_ctx ctx;
 
-    AES_init_ctx_iv(&ctx, aeskey, iv);
-    AES_CBC_decrypt_buffer(&ctx, in, 64);
+    Aes128CbcDecrypt(aeskey, iv, in, 64);
     HttpAddText("<code>");
     HttpAddBytesAsHex(in, sizeof(in));
     HttpAddText("</code>");
@@ -132,7 +130,7 @@
     uint8_t server_MAC_key_20[20];
     uint8_t client_key_16[16];
     uint8_t server_key_16[16];
-    TlsPrfKeys(masterSecret, clientRandom, serverRandom, client_MAC_key_20, server_MAC_key_20, client_key_16, server_key_16);
+    TlsPrfKeysAes128Sha1(masterSecret, clientRandom, serverRandom, client_MAC_key_20, server_MAC_key_20, client_key_16, server_key_16);
     HttpAddText("<code>");
     HttpAddBytesAsHex(client_MAC_key_20, sizeof(client_MAC_key_20)); HttpAddText("\r\n");
     HttpAddBytesAsHex(server_MAC_key_20, sizeof(server_MAC_key_20)); HttpAddText("\r\n");
@@ -218,7 +216,7 @@
     {
         if (PriKeyDecryptFinished(rsaTicket)) HttpAddText("Finished\r\n");
         else                                  HttpAddText("Not finished\r\n");
-        BnAsHttp1024((uint32_t*)PriKeyDecryptResult(rsaTicket));
+        BnAsHttp1024((uint32_t*)PriKeyDecryptResultLittleEndian(rsaTicket));
     }
     else
     {