From 57571328bf089f7d75f7c57e7af1d572f8193927 Mon Sep 17 00:00:00 2001 From: hyugogirubato <65763543+hyugogirubato@users.noreply.github.com> Date: Sat, 6 Jul 2024 21:00:24 +0200 Subject: [PATCH] Fix private key size --- keydive/keydive.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/keydive/keydive.js b/keydive/keydive.js index c10dadd..2aa0bdd 100644 --- a/keydive/keydive.js +++ b/keydive/keydive.js @@ -170,7 +170,6 @@ const GetCertificatePrivateKey = (address, name) => { const bytes = new Uint8Array(buffer); // Check for DER encoding markers for the beginning of a private key (MII). if (bytes[0] === 0x30 && bytes[1] === 0x82) { - /* let key = bytes; try { // Fixing key size @@ -180,10 +179,9 @@ const GetCertificatePrivateKey = (address, name) => { } catch (e) { print(Level.ERROR, `${e.message} (${address})`); } - */ print(Level.DEBUG, `[*] GetCertificatePrivateKey: ${name}`); !OEM_CRYPTO_API.includes(name) && print(Level.WARNING, `The function "${name}" does not belong to the referenced functions. Communicate it to the developer to improve the tool.`); - send('private_key', bytes); + send('private_key', key); } } }