mirror of
https://github.com/fluencelabs/js-libp2p-noise
synced 2025-06-09 18:11:34 +00:00
Fix yarn.lock
This commit is contained in:
parent
3b0df24fbd
commit
dff7f8bae0
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
bundle
|
||||
node_modules/
|
||||
.idea
|
||||
.env
|
||||
|
@ -94,7 +94,7 @@ export async function verifySignedPayload(
|
||||
const generatedPayload = getHandshakePayload(noiseStaticKey);
|
||||
// Unmarshaling from PublicKey protobuf
|
||||
const publicKey = keys.unmarshalPublicKey(identityKey);
|
||||
if (!publicKey.verify(generatedPayload, payload.identitySig)) {
|
||||
if (!payload.identitySig || !publicKey.verify(generatedPayload, Buffer.from(payload.identitySig))) {
|
||||
throw new Error("Static key doesn't match to peer that signed payload!");
|
||||
}
|
||||
return remotePeer;
|
||||
|
Loading…
x
Reference in New Issue
Block a user