/**
 * Shared utilities for certificate verification
 */
import type { PeerCertificate, CertificateChainEntry } from './types.ts';
/**
 * Convert a buffer to PEM format
 * @param buffer - Certificate data as buffer
 * @param type - Certificate type (e.g., 'CERTIFICATE')
 * @returns PEM formatted string
 */
export declare function bufferToPem(buffer: Buffer, type: string): string;
/**
 * Extract certificate chain from peer certificate object
 * @param peerCertificate - Peer certificate object from TLS connection
 * @returns Certificate chain with issuer relationships
 */
export declare function extractCertificateChain(peerCertificate: PeerCertificate): CertificateChainEntry[];
/**
 * Extract CRL Distribution Points from a certificate using PKI.js
 * @param certPem - Certificate in PEM format
 * @returns Array of CRL distribution point URLs
 */
export declare function extractCRLDistributionPoints(certPem: string): string[];
/**
 * Extract both CRL and OCSP URLs from a certificate in a single parse operation
 * @param certPem - Certificate in PEM format
 * @returns Object containing arrays of CRL and OCSP URLs
 */
export declare function extractRevocationUrls(certPem: string): {
    crlUrls: string[];
    ocspUrls: string[];
};
/**
 * Extract OCSP responder URLs from a certificate
 * @param certPem - Certificate in PEM format
 * @returns Array of OCSP responder URLs
 */
export declare function extractOCSPUrls(certPem: string): string[];
/**
 * Convert PEM string to buffer for PKI.js parsing
 * @param pem - PEM formatted certificate
 * @returns Buffer containing certificate data
 */
export declare function pemToBuffer(pem: string): ArrayBuffer;
/**
 * Create a cache key for certificate verification
 * @param certPem - Certificate in PEM format
 * @param issuerPem - Issuer certificate in PEM format
 * @param method - Verification method (ocsp, crl)
 * @param additionalData - Additional data to include in hash
 * @returns Cache key string
 */
export declare function createCacheKey(certPem: string, issuerPem: string, method: 'ocsp' | 'crl', additionalData?: Record<string, any>): string;
/**
 * Create a cache key for CRL storage
 * @param distributionPoint - CRL distribution point URL
 * @returns Cache key string
 */
export declare function createCRLCacheKey(distributionPoint: string): string;
/**
 * Create a composite ID for revoked certificate lookup
 * @param issuerKeyId - Issuer key identifier or DN hash
 * @param serialNumber - Certificate serial number
 * @returns Composite ID string
 */
export declare function createRevokedCertificateId(issuerKeyId: string, serialNumber: string): string;
/**
 * Extract serial number from a certificate
 * @param certPem - Certificate in PEM format
 * @returns Certificate serial number as string
 */
export declare function extractSerialNumber(certPem: string): string;
/**
 * Extract issuer key identifier from a certificate
 * @param certPem - Certificate in PEM format
 * @returns Issuer key identifier as hex string, or hash of issuer DN if not available
 */
export declare function extractIssuerKeyId(certPem: string): string;
export declare function getCertificateCacheTable(): unknown;
