mirror of
https://github.com/openpgpjs/openpgpjs.git
synced 2026-03-20 15:18:51 +00:00
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:
@@ -476,7 +476,7 @@ export class Message {
|
||||
* @param {Array<module:type/keyid~KeyID>} [signingKeyIDs] - Array of key IDs to use for signing. Each signingKeyIDs[i] corresponds to signingKeys[i]
|
||||
* @param {Date} [date] - Override the creation time of the signature
|
||||
* @param {Array} [userIDs] - User IDs to sign with, e.g. [{ name:'Steve Sender', email:'steve@openpgp.org' }]
|
||||
* @param {Array} [notations] - Notation Data to add to the signatures, e.g. [{ name: 'test@example.org', value: new TextEncoder().encode('test'), humanReadable: true }]
|
||||
* @param {Array} [notations] - Notation Data to add to the signatures, e.g. [{ name: 'test@example.org', value: new TextEncoder().encode('test'), humanReadable: true, critical: false }]
|
||||
* @param {Object} [config] - Full configuration, defaults to openpgp.config
|
||||
* @returns {Promise<Message>} New message with signed content.
|
||||
* @async
|
||||
@@ -564,7 +564,7 @@ export class Message {
|
||||
* @param {Array<module:type/keyid~KeyID>} [signingKeyIDs] - Array of key IDs to use for signing. Each signingKeyIDs[i] corresponds to signingKeys[i]
|
||||
* @param {Date} [date] - Override the creation time of the signature
|
||||
* @param {Array} [userIDs] - User IDs to sign with, e.g. [{ name:'Steve Sender', email:'steve@openpgp.org' }]
|
||||
* @param {Array} [notations] - Notation Data to add to the signatures, e.g. [{ name: 'test@example.org', value: new TextEncoder().encode('test'), humanReadable: true }]
|
||||
* @param {Array} [notations] - Notation Data to add to the signatures, e.g. [{ name: 'test@example.org', value: new TextEncoder().encode('test'), humanReadable: true, critical: false }]
|
||||
* @param {Object} [config] - Full configuration, defaults to openpgp.config
|
||||
* @returns {Promise<Signature>} New detached signature of message content.
|
||||
* @async
|
||||
@@ -707,7 +707,7 @@ export class Message {
|
||||
* @param {Array<module:type/keyid~KeyID>} [signingKeyIDs] - Array of key IDs to use for signing. Each signingKeyIDs[i] corresponds to signingKeys[i]
|
||||
* @param {Date} [date] - Override the creationtime of the signature
|
||||
* @param {Array} [userIDs] - User IDs to sign with, e.g. [{ name:'Steve Sender', email:'steve@openpgp.org' }]
|
||||
* @param {Array} [notations] - Notation Data to add to the signatures, e.g. [{ name: 'test@example.org', value: new TextEncoder().encode('test'), humanReadable: true }]
|
||||
* @param {Array} [notations] - Notation Data to add to the signatures, e.g. [{ name: 'test@example.org', value: new TextEncoder().encode('test'), humanReadable: true, critical: false }]
|
||||
* @param {Boolean} [detached] - Whether to create detached signature packets
|
||||
* @param {Object} [config] - Full configuration, defaults to openpgp.config
|
||||
* @returns {Promise<PacketList>} List of signature packets.
|
||||
|
||||
Reference in New Issue
Block a user