TypeScript: mark signature arg as optional in Key.isRevoked() and remove SignaturePacket.verified (#1486)

This commit is contained in:
Ivan Pizhenko 2022-02-10 22:13:34 +02:00 committed by GitHub
parent 717f6bffe4
commit 255926ab19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

3
openpgp.d.ts vendored
View File

@ -57,7 +57,7 @@ export abstract class Key {
public verifyPrimaryKey(date?: Date, userID?: UserID, config?: Config): Promise<void>; // 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<boolean>;
public isRevoked(signature?: SignaturePacket, key?: AnyKeyPacket, date?: Date, config?: Config): Promise<boolean>;
public getRevocationCertificate(date?: Date, config?: Config): Promise<MaybeStream<string> | undefined>;
public getEncryptionKey(keyID?: KeyID, date?: Date | null, userID?: UserID, config?: Config): Promise<this | Subkey>;
public getSigningKey(keyID?: KeyID, date?: Date | null, userID?: UserID, config?: Config): Promise<this | Subkey>;
@ -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<void>;
public verify(key: AnyKeyPacket, signatureType: enums.signature, data: Uint8Array, date?: Date, detached?: boolean, config?: Config): Promise<void>; // throws on error