Add support for creating critical signature subpackets (#1599)

Assign most signature subpacket types a criticality based on whether
failing to interpret their meaning would negatively impact security.

For Notation Data subpackets, let the user indicate their criticality
using the `signatureNotations[*].critical` property.
This commit is contained in:
Daniel Huigens
2023-02-17 12:21:03 +01:00
committed by GitHub
parent 0307111993
commit 71fef439ed
8 changed files with 60 additions and 43 deletions

View File

@@ -138,7 +138,8 @@ import {
const textSignedWithNotations: string = await sign({ signingKeys: privateKeys, message: textMessage, signatureNotations: [{
name: 'test@example.org',
value: new TextEncoder().encode('test'),
humanReadable: true
humanReadable: true,
critical: false
}] });
expect(textSignedWithNotations).to.include('-----BEGIN PGP MESSAGE-----');