UNPKG

sslko

Version:

A simple tool to check SSL/TLS certificate information for a given domain.

48 lines (47 loc) 1.68 kB
/** * Enum for certificate error codes. * These codes are used to identify specific errors that can occur when fetching SSL/TLS certificates. * @see https://nodejs.org/api/tls.html#x509-certificate-error-codes */ export declare const CertificateErrorCode: { TIMEOUT: string; INVALID_PORT: string; CERT_ERROR: string; MISSING_CERTIFICATE: string; UNABLE_TO_GET_ISSUER_CERT: string; UNABLE_TO_GET_CRL: string; UNABLE_TO_DECRYPT_CERT_SIGNATURE: string; UNABLE_TO_DECRYPT_CRL_SIGNATURE: string; UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: string; CERT_SIGNATURE_FAILURE: string; CRL_SIGNATURE_FAILURE: string; CERT_NOT_YET_VALID: string; CERT_HAS_EXPIRED: string; CRL_NOT_YET_VALID: string; CRL_HAS_EXPIRED: string; ERROR_IN_CERT_NOT_BEFORE_FIELD: string; ERROR_IN_CERT_NOT_AFTER_FIELD: string; ERROR_IN_CRL_LAST_UPDATE_FIELD: string; ERROR_IN_CRL_NEXT_UPDATE_FIELD: string; OUT_OF_MEM: string; DEPTH_ZERO_SELF_SIGNED_CERT: string; SELF_SIGNED_CERT_IN_CHAIN: string; UNABLE_TO_GET_ISSUER_CERT_LOCALLY: string; UNABLE_TO_VERIFY_LEAF_SIGNATURE: string; CERT_CHAIN_TOO_LONG: string; CERT_REVOKED: string; INVALID_CA: string; PATH_LENGTH_EXCEEDED: string; INVALID_PURPOSE: string; CERT_UNTRUSTED: string; CERT_REJECTED: string; HOSTNAME_MISMATCH: string; }; export type CertificateErrorCode = keyof typeof CertificateErrorCode; /** * Custom error class for handling certificate-related errors. */ export declare class CertificateError extends Error { code: CertificateErrorCode | string; constructor(message: string, code?: string | CertificateErrorCode); }