Function generateCACertificate
- generateCACertificate(options?): Promise<{
cert: string;
key: string;
}> Parameters
- options: {
bits?: number;
commonName?: string;
countryName?: string;
nameConstraints?: {
permitted?: string[];
};
organizationName?: string;
} = {}Optional
bits?: number
Optional
commonName?: string
Optional
countryName?: string
Optional
nameConstraints?: {
permitted?: string[];
}
Optional
permitted?: string[]
Optional
organizationName?: string
Returns Promise<{
cert: string;
key: string;
}>
Generate a CA certificate for mocking HTTPS.
Returns a promise, for an object with key and cert properties, containing the generated private key and certificate in PEM format.
These can be saved to disk, and their paths passed as HTTPS options to a Mockttp server.