Stage without sha1.
[uccvend-snackrom.git] / ROM2 / main_basic.c
index cddfb12..f6a5b9f 100644 (file)
@@ -14,6 +14,7 @@
 #include "sci.h"
 #include "vend.h"
 #include "xmodem.h"
+#include "sha1.h"
 
 u8 last_standalone;
 u8 last_switch_input;
@@ -329,7 +330,7 @@ void getrom() {
        s[2] = _rom_src_data[2];
        s[3] = '\0';
        send_string(s);
-       send_string(CRLF " Type YES to download via XMODEM: ");
+       send_string(CRLF " Type YES to download rom.tar.bz2 via XMODEM: ");
        msg_clr();
        while (!sci_have_packet); /* spin */
        if (!my_strncmp("YES", (char*)sci_rx_buf, 3)) return;
@@ -372,6 +373,9 @@ void quit() {
                unknown_command();
 }
 
+//SHA1_CTX ctx;
+//u8 sha1_digest[SHA1_SIGNATURE_SIZE];
+
 int main() {
        u8 i;
        for (i = 0; i < 11; i++)
@@ -451,6 +455,11 @@ int main() {
                }
 
                if (sci_have_packet) {
+                       if (must_verify()) {
+                               //SHA1_Init(&ctx);
+                               //SHA1_Update(&ctx, sci_rx_buf, my_strlen(sci_rx_buf));
+                               //SHA1_Final(sha1_digest, &ctx);
+                       }
                        switch (sci_rx_buf[0]) {
                                case '\0':
                                case '#':

UCC git Repository :: git.ucc.asn.au