diff --git a/types/node-forge/index.d.ts b/types/node-forge/index.d.ts index e30a217ddc..99d3f5b45d 100644 --- a/types/node-forge/index.d.ts +++ b/types/node-forge/index.d.ts @@ -5,6 +5,7 @@ // Aakash Goenka // Rafal2228 // Beeno Tung +// Joe Flateau // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.6 @@ -410,6 +411,26 @@ declare module "node-forge" { function pkcs12FromAsn1(obj: any, strict?: boolean, password?: string): Pkcs12Pfx; function pkcs12FromAsn1(obj: any, password?: string): Pkcs12Pfx; } + namespace pkcs7 { + interface PkcsSignedData { + content?: string | util.ByteBuffer; + contentInfo?: { value: any[] }; + + addCertificate(certificate: pki.Certificate): void; + addSigner(options: { + key: string; + certificate: pki.Certificate; + digestAlgorithm: string; + authenticatedAttributes: { type: string; value?: string }[]; + }): void; + sign(options?:{ + detached?: boolean + }): void; + toAsn1(): asn1.Asn1; + } + + function createSignedData(): PkcsSignedData; + } namespace md {