Fix SHA384 truncated size

This commit is contained in:
Cryptiiiic 2022-10-13 03:47:57 -07:00
parent a0f97dbc81
commit 0c6c70eb94
No known key found for this signature in database
GPG key ID: 6027B509EFE3A76B
2 changed files with 2 additions and 2 deletions

2
external/tsschecker vendored

@ -1 +1 @@
Subproject commit 4734e9a597dab98142b84829d88b6c0a24e98377
Subproject commit 7b1b3020a6e43d899fcfb2283d32bd88a0dc8286

View file

@ -858,7 +858,7 @@ void futurerestore::enterPwnRecovery(plist_t build_identity, std::string bootarg
"failed to write generator to nvram");
retassure(!irecv_saveenv(_client->recovery->client), "failed to save nvram");
uint64_t gen = std::stoull(generator, nullptr, 16);
auto *nonce = (uint8_t *)alloc.allocate(_client->nonce_size);
auto *nonce = (uint8_t *)alloc.allocate(_client->nonce_size == 32 ? 48 : 20);
if (_client->nonce_size == 20) {
SHA1((unsigned char *) &gen, 8, nonce);
} else if (_client->nonce_size == 32) {