export type PrivateKey = string; export type CertificatePublicKey = { /** * public key in DER format * DER => Uint8Array */ buffer: Uint8Array; algorithm: string; }; export type X509Certificate = { internal: T; /** * Checks new Date() is in the validity period * of the certificate, basically outside notBefore and notAfter */ isWithinValidity(): boolean; getSubjectField(key: string): string[]; getAlternativeDNSNames(): string[]; isIssuer(ofCert: X509Certificate): boolean; getPublicKey(): CertificatePublicKey; /** * Get the Authority Information Access extension value, * tells us where to get issuer certificate from */ getAIAExtension(): string | undefined; /** * verify this certificate issued the certificate passed * @param otherCert the supposedly issued certificate to verify * */ verifyIssued(otherCert: X509Certificate): boolean | Promise; serialiseToPem(): string; };