UNPKG

1.72 kBTypeScriptView Raw
1/// <reference types="node" />
2import forge from 'node-forge';
3export declare function getP12CertFingerprint(p12Buffer: Buffer | string, passwordRaw: string | null): string;
4export declare function findP12CertSerialNumber(p12Buffer: Buffer | string, passwordRaw: string | null): string | null;
5export declare function getCertData(p12Buffer: Buffer | string, passwordRaw: string | null): {
6 serialNumber: string | null;
7 version: number;
8 signature: any;
9 siginfo: any;
10 validity: {
11 notBefore: Date;
12 notAfter: Date;
13 };
14 issuer: {
15 getField(sn: string | forge.pki.CertificateFieldOptions): any;
16 addField(attr: forge.pki.CertificateField): void;
17 attributes: any[];
18 hash: any;
19 };
20 subject: {
21 getField(sn: string | forge.pki.CertificateFieldOptions): any;
22 addField(attr: forge.pki.CertificateField): void;
23 attributes: any[];
24 hash: any;
25 };
26 extensions: any[];
27 privateKey: forge.pki.PrivateKey;
28 publicKey: forge.pki.PublicKey;
29 md: any;
30 setSubject(attrs: forge.pki.CertificateField[], uniqueId?: string | undefined): void;
31 setIssuer(attrs: forge.pki.CertificateField[], uniqueId?: string | undefined): void;
32 setExtensions(exts: any[]): void;
33 getExtension(options: string | {
34 name: string;
35 } | {
36 id: number;
37 }): {} | undefined;
38 sign(key: forge.pki.PrivateKey, md?: forge.md.MessageDigest | undefined): void;
39 verify(child: forge.pki.Certificate): boolean;
40 getAttribute(opts: string | forge.pki.GetAttributeOpts): forge.pki.Attribute | null;
41 isIssuer(parent: forge.pki.Certificate): boolean;
42 issued(child: forge.pki.Certificate): boolean;
43};