mirror of
https://github.com/fluencelabs/js-libp2p-noise
synced 2025-06-09 16:21:21 +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/
|
node_modules/
|
||||||
.idea
|
.idea
|
||||||
.env
|
.env
|
||||||
|
@ -94,7 +94,7 @@ export async function verifySignedPayload(
|
|||||||
const generatedPayload = getHandshakePayload(noiseStaticKey);
|
const generatedPayload = getHandshakePayload(noiseStaticKey);
|
||||||
// Unmarshaling from PublicKey protobuf
|
// Unmarshaling from PublicKey protobuf
|
||||||
const publicKey = keys.unmarshalPublicKey(identityKey);
|
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!");
|
throw new Error("Static key doesn't match to peer that signed payload!");
|
||||||
}
|
}
|
||||||
return remotePeer;
|
return remotePeer;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user