fix: add password parameter to pemToPfx and importCertificate functions for enhanced security
This commit is contained in:
+2
-1
@@ -47,8 +47,9 @@ export class KeyVaultStore {
|
||||
return expiresOn.getTime() - Date.now() <= thresholdMs;
|
||||
}
|
||||
|
||||
async importCertificate(name: string, cert: string | Buffer, format: 'pem' | 'pfx' = 'pem'): Promise<void> {
|
||||
async importCertificate(name: string, cert: string | Buffer, format: 'pem' | 'pfx' = 'pem', password?: string): Promise<void> {
|
||||
const options: ImportCertificateOptions = {
|
||||
password,
|
||||
policy: {
|
||||
contentType: format === 'pfx' ? 'application/x-pkcs12' : 'application/x-pem-file',
|
||||
issuerName: 'Unknown',
|
||||
|
||||
Reference in New Issue
Block a user