This commit is contained in:
xiaojunnuo
2024-09-06 22:32:29 +08:00
parent b80210f24b
commit 1133d6b0f7
3 changed files with 26 additions and 26 deletions

View File

@@ -239,7 +239,10 @@ export class AcmeService {
const privateKeyType = options.privateKeyType || "rsa_2048";
const privateKeyArr = privateKeyType.split("_");
const type = privateKeyArr[0];
const size = parseInt(privateKeyArr[1]);
let size = 2048;
if (privateKeyArr.length > 1) {
size = parseInt(privateKeyArr[1]);
}
if (type == "ec") {
const name: any = "P-" + size;
privateKey = await acme.crypto.createPrivateEcdsaKey(name);