office-addin-dev-certs
Version:
For managing certificates when developing Office Add-ins.
25 lines (24 loc) • 1.19 kB
TypeScript
export declare enum CertificateStatus {
Installed = "installed",
NotInstalled = "not-installed",
Error = "error"
}
export interface CertificateVerificationResult {
status: CertificateStatus;
error?: Error;
}
export declare const outputMarker: string;
/**
* Checks if the CA certificate is installed.
* @param returnInvalidCertificate - If true, returns true even if the certificate is expired.
* @returns true if the certificate is installed, false otherwise.
* @throws Error if the verification script fails to execute (e.g., PowerShell not found, permission issues).
*/
export declare function isCaCertificateInstalled(returnInvalidCertificate?: boolean): boolean;
/**
* Gets the CA certificate installation status with detailed error information.
* @param returnInvalidCertificate - If true, returns Installed even if the certificate is expired.
* @returns A CertificateVerificationResult object with status and optional error information.
*/
export declare function getCaCertificateStatus(returnInvalidCertificate?: boolean): CertificateVerificationResult;
export declare function verifyCertificates(certificatePath?: string, keyPath?: string): boolean;