DefinitelyTyped/types/x509.js/index.d.ts
Stephane Moser 06ed23b54b Add types to library x509.js (#41713)
* Add files for types

* Fix lint issues

* Add tests

* Remove test data
2020-01-21 04:28:26 -05:00

29 lines
733 B
TypeScript

// Type definitions for x509.js 1.0
// Project: https://github.com/encharm/x509.js
// Definitions by: Stephane Moser <https://github.com/Moser-ss>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export interface Certificate {
publicModulus: string;
publicExponent: string;
subject: {
commonName: string;
};
issuer: {
commonName: string;
};
serial: string;
notBefore: string;
notAfter: string;
altNames: string[];
ocspList: string[];
}
export interface Key {
publicExponent: string;
publicModulus: string;
}
export function parseCert(certificate: string): Certificate;
export function parseKey(key: string): Key;
export function info(): number;