minor: improve auth URL
This commit is contained in:
parent
68b58215f1
commit
ae16710fc0
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue