/** * @license * Copyright (c) Peculiar Ventures, LLC. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import { ECParameters } from '@peculiar/asn1-ecc'; import { RSAPublicKey } from '@peculiar/asn1-rsa'; import { Certificate } from '@peculiar/asn1-x509'; import { INameJSON } from './name'; import { Extension, TExtensionValue } from './extension'; import { AsnData } from './asn_data'; export interface ISignature { algorithm: string; value: BufferSource; params?: { algorithm: string; value: BufferSource; }[]; } export interface IPublicKey { algorithm: string; value: BufferSource; params?: ECParameters | RSAPublicKey | IPublicKey[]; } export declare class X509Certificate extends AsnData { readonly serialNumber: string; readonly subject: INameJSON[]; readonly issuer: INameJSON[]; readonly notBefore: Date; readonly notAfter: Date; readonly validity: string; extensions: Extension[]; readonly version: number; thumbprints: Record; readonly type = "X.509 Certificate"; readonly tag: string; constructor(raw: string); parseExtensions(): void; private getPublicKeyInfo; get publicKey(): IPublicKey; get signature(): ISignature; getThumbprint(algorithm?: string): Promise; get commonName(): string; get issuerCommonName(): string; get isRoot(): boolean; subjectToString(): string; issuerToString(): string; toString(format?: 'pem' | 'base64' | 'base64url'): string; downloadAsPEM(name?: string): void; downloadAsDER(name?: string): void; }