mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-01-12 22:46:38 +08:00
node-forge: add types for pkcs7 (#29374)
* add types for pkcs7 * bump version number * revert change of node-forge version number * mark content/contentInfo as optional and add arg for sign(options?)
This commit is contained in:
21
types/node-forge/index.d.ts
vendored
21
types/node-forge/index.d.ts
vendored
@@ -5,6 +5,7 @@
|
||||
// Aakash Goenka <https://github.com/a-k-g>
|
||||
// Rafal2228 <https://github.com/rafal2228>
|
||||
// Beeno Tung <https://github.com/beenotung>
|
||||
// Joe Flateau <https://github.com/joeflateau>
|
||||
// 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 {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user