mirror of
https://github.com/fluencelabs/js-libp2p-noise
synced 2025-04-25 19:42:25 +00:00
Merge pull request #59 from jacobheun/fix/public-key
fix: marshal the verified peer from its public key
This commit is contained in:
commit
ef80af69c7
@ -97,7 +97,7 @@ export async function verifySignedPayload(
|
|||||||
if (!payload.identitySig || !publicKey.verify(generatedPayload, Buffer.from(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 PeerId.createFromPubKey(identityKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getHkdf(ck: bytes32, ikm: bytes): Hkdf {
|
export function getHkdf(ck: bytes32, ikm: bytes): Hkdf {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user