Bind runtime handoff to node proof
This commit is contained in:
parent
ca67ba92d2
commit
46d19aeb45
7 changed files with 249 additions and 55 deletions
|
|
@ -91,7 +91,10 @@ test('verifies a fresh proof from the key fingerprint bound into the signed regi
|
|||
'A'.repeat(43),
|
||||
);
|
||||
const response = responseFor(challenge);
|
||||
assert.equal(verifyNodePossessionResponse(response, challenge, registration, NOW + 1), true);
|
||||
const possession = verifyNodePossessionResponse(response, challenge, registration, NOW + 1);
|
||||
assert.equal(possession.registration, registration);
|
||||
assert.equal(possession.challenge, challenge);
|
||||
assert.deepEqual(possession.response, response);
|
||||
assert.throws(() => verifyNodePossessionResponse(response, challenge, registration, NOW + 2), /proof_invalid/);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue