import type { ICache, SystemConfig } from '@citrineos/base'; import { OCPP2_0_1 } from '@citrineos/base'; import type { IChargingStationCertificateAuthorityClient, IV2GCertificateAuthorityClient } from './client/interface.js'; import type { ILogObj } from 'tslog'; import { Logger } from 'tslog'; export declare class CertificateAuthorityService { private readonly _v2gClient; private readonly _chargingStationClient; private readonly _logger; private readonly _cache; private readonly _config; constructor(config: SystemConfig, cache: ICache, logger?: Logger, chargingStationClient?: IChargingStationCertificateAuthorityClient, v2gClient?: IV2GCertificateAuthorityClient); /** * Retrieves the certificate chain for V2G- and Charging Station certificates. * * @param {string} csrString - The Certificate Signing Request string. * @param {string} stationId - The station identifier. * @param {CertificateSigningUseEnumType} [certificateType] - The type of certificate to retrieve. * @return {Promise} The certificate chain without the root certificate. */ getCertificateChain(csrString: string, stationId: string, certificateType?: OCPP2_0_1.CertificateSigningUseEnumType | null): Promise; signedSubCaCertificateByExternalCA(csrString: string): Promise; getSignedContractData(iso15118SchemaVersion: string, exiRequest: string): Promise; getRootCACertificateFromExternalCA(certificateType: OCPP2_0_1.InstallCertificateUseEnumType): Promise; updateSecurityCertChainKeyMap(serverId: string, certificateChain: string, privateKey: string): void; validateCertificateChainPem(certificateChainPem: string): Promise; validateCertificateHashData(ocspRequestData: OCPP2_0_1.OCSPRequestDataType[]): Promise; /** * Create a certificate chain including leaf and sub CA certificates except for the root certificate. * * @param {string} signedCert - The leaf certificate. * @param {string} caCerts - CA certificates. * @return {string} The certificate chain pem. */ private _createCertificateChainWithoutRootCA; private _instantiateV2GClient; private _instantiateChargingStationClient; }