mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 14:25:17 +00:00
Improved passphrase extraction
This commit is contained in:
@@ -270,13 +270,12 @@ export async function readCertificatesFromOptions(options: Certificates): Promis
|
||||
const parsedContents = await Promise.all(rawContentsPromises);
|
||||
const pemParsedContents = parsedContents.map((file, index) => {
|
||||
const certName = Object.keys(options)[index];
|
||||
const pem = parsePEM(
|
||||
certName,
|
||||
file,
|
||||
typeof options.signerKey === "object"
|
||||
? options.signerKey.passphrase
|
||||
: undefined
|
||||
);
|
||||
const passphrase = (
|
||||
typeof options.signerKey === "object" &&
|
||||
options.signerKey?.passphrase
|
||||
) || undefined;
|
||||
|
||||
const pem = parsePEM(certName, file, passphrase);
|
||||
|
||||
if (!pem) {
|
||||
throw new Error(formatMessage("INVALID_CERTS", certName));
|
||||
|
||||
Reference in New Issue
Block a user