Skip to content

Commit 060571c

Browse files
authored
fix: signingKey should not be part of the computed hash
In some flows it `signingKey` is serialized to `null` and messes up the signature.
1 parent f0d9719 commit 060571c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/tdf3/src/assertions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export type AssertionPayload = {
4343
* @returns the hexadecimal string representation of the hash
4444
*/
4545
export async function hash(a: Assertion): Promise<string> {
46-
const result = canonicalizeEx(a, { exclude: ['binding', 'hash', 'sign', 'verify'] });
46+
const result = canonicalizeEx(a, { exclude: ['binding', 'hash', 'sign', 'verify', 'signingKey'] });
4747

4848
const hash = await crypto.subtle.digest('SHA-256', new TextEncoder().encode(result));
4949
return hex.encodeArrayBuffer(hash);

0 commit comments

Comments
 (0)