mirror of
https://github.com/fluencelabs/js-libp2p-noise
synced 2025-06-20 00:41:43 +00:00
Verify payload in stage 1
This commit is contained in:
@ -80,7 +80,7 @@ export class Handshake {
|
||||
if (!libp2pRemotekey) {
|
||||
throw new Error("Missing remote's libp2p public key, can't verify signature.");
|
||||
}
|
||||
verifySignedPayload(receivedMessageBuffer.ns, plaintext, libp2pRemotekey);
|
||||
await verifySignedPayload(receivedMessageBuffer.ns, plaintext, libp2pRemotekey);
|
||||
} else {
|
||||
logger('Stage 1 - Responder sending out first message with signed payload and static key.');
|
||||
const signedPayload = signPayload(this.libp2pPrivateKey, getHandshakePayload(this.staticKeys.publicKey));
|
||||
|
Reference in New Issue
Block a user