minor: improve auth URL

This commit is contained in:
King Kévin 2024-04-16 09:03:51 +02:00
parent 68b58215f1
commit ae16710fc0
1 changed files with 2 additions and 2 deletions

View File

@ -558,10 +558,9 @@ void cdc_task(void)
char uid[4 * 3 * 2 + 1];
b2h((uint8_t*)UID_BASE, uid, 4 * 3);
uid[sizeof(uid) - 1] = 0; // end string
tud_cdc_write_str_flush("\r\nenter into https://passkey.cuvoodoo.info/: ");
tud_cdc_write_str_flush("\r\ngo to https://passkey.cuvoodoo.info/?auth=");
tud_cdc_write_str_flush(uid);
tud_cdc_write_str_flush(tmp);
tud_cdc_write_str_flush("\r\n");
uint8_t hash_in[sizeof(manuf_key) + sizeof(tmp)];
memcpy(&hash_in[0], manuf_key, strlen(manuf_key));
memcpy(&hash_in[strlen(manuf_key)], tmp, strlen(tmp));
@ -570,6 +569,7 @@ void cdc_task(void)
char hash_str[SHA256_HASH_SIZE * 2 + 1];
b2h(hash_out.bytes, hash_str, SHA256_HASH_SIZE);
hash_str[SHA256_HASH_SIZE * 2] = 0; // end string
tud_cdc_write_str_flush("\r\nexpected response: ");
tud_cdc_write_str_flush(hash_str); // luckily the USB packet len is the same as the string
}
if (strlen(config.user_key)) {