From 5c854c4311fe355baf5dd8832dded312919f671b Mon Sep 17 00:00:00 2001 From: Ivan Pizhenko Date: Mon, 7 Feb 2022 20:48:20 +0200 Subject: [PATCH 1/2] Fix Key.isRevoked() Typescript declaration --- openpgp.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/openpgp.d.ts b/openpgp.d.ts index c1b7bc831..689f8a5d4 100644 --- a/openpgp.d.ts +++ b/openpgp.d.ts @@ -1,6 +1,6 @@ /** * Type definitions for OpenPGP.js http://openpgpjs.org/ - * + * * Contributors: * - FlowCrypt a. s. * - Guillaume Lacasa @@ -57,7 +57,7 @@ export abstract class Key { public verifyPrimaryKey(date?: Date, userID?: UserID, config?: Config): Promise; // throws on error public verifyPrimaryUser(publicKeys: PublicKey[], date?: Date, userIDs?: UserID, config?: Config): Promise<{ keyID: KeyID, valid: boolean | null }[]>; public verifyAllUsers(publicKeys: PublicKey[], date?: Date, config?: Config): Promise<{ userID: string, keyID: KeyID, valid: boolean | null }[]>; - public isRevoked(signature: SignaturePacket, key?: AnyKeyPacket, date?: Date, config?: Config): Promise; + public isRevoked(signature?: SignaturePacket, key?: AnyKeyPacket, date?: Date, config?: Config): Promise; public getRevocationCertificate(date?: Date, config?: Config): Promise | undefined>; public getEncryptionKey(keyID?: KeyID, date?: Date | null, userID?: UserID, config?: Config): Promise; public getSigningKey(keyID?: KeyID, date?: Date | null, userID?: UserID, config?: Config): Promise; @@ -171,13 +171,13 @@ export class CleartextMessage { /* ############## v5 MSG #################### */ export function generateSessionKey(options: { encryptionKeys: MaybeArray, date?: Date, encryptionUserIDs?: MaybeArray, config?: PartialConfig }): Promise; -export function encryptSessionKey(options: SessionKey & { +export function encryptSessionKey(options: SessionKey & { encryptionKeys?: MaybeArray, passwords?: MaybeArray, format?: 'armored', wildcard?: boolean, encryptionKeyIDs?: MaybeArray, date?: Date, encryptionUserIDs?: MaybeArray, config?: PartialConfig }) : Promise; -export function encryptSessionKey(options: SessionKey & { +export function encryptSessionKey(options: SessionKey & { encryptionKeys?: MaybeArray, passwords?: MaybeArray, format: 'binary', wildcard?: boolean, encryptionKeyIDs?: MaybeArray, date?: Date, encryptionUserIDs?: MaybeArray, config?: PartialConfig }) : Promise; -export function encryptSessionKey(options: SessionKey & { +export function encryptSessionKey(options: SessionKey & { encryptionKeys?: MaybeArray, passwords?: MaybeArray, format: 'object', wildcard?: boolean, encryptionKeyIDs?: MaybeArray, date?: Date, encryptionUserIDs?: MaybeArray, config?: PartialConfig }) : Promise>; export function decryptSessionKeys>(options: { message: Message, decryptionKeys?: MaybeArray, passwords?: MaybeArray, date?: Date, config?: PartialConfig }): Promise; From 163848157e879ac20f0509377b713f7e019f4b1a Mon Sep 17 00:00:00 2001 From: Ivan Pizhenko Date: Thu, 10 Feb 2022 21:13:21 +0200 Subject: [PATCH 2/2] Remove SignaturePacket.verified --- openpgp.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/openpgp.d.ts b/openpgp.d.ts index 689f8a5d4..4f7258604 100644 --- a/openpgp.d.ts +++ b/openpgp.d.ts @@ -520,7 +520,6 @@ export class SignaturePacket extends BasePacket { public issuerKeyVersion: null | number; public issuerFingerprint: null | Uint8Array; public preferredAEADAlgorithms: enums.aead[] | null; - public verified: null | boolean; public revoked: null | boolean; public sign(key: AnySecretKeyPacket, data: Uint8Array, date?: Date, detached?: boolean): Promise; public verify(key: AnyKeyPacket, signatureType: enums.signature, data: Uint8Array, date?: Date, detached?: boolean, config?: Config): Promise; // throws on error