misc: corrected direct issuance checks for CAs

This commit is contained in:
Sheen Capadngan
2025-05-19 21:06:13 +08:00
parent 7f6dcd3afa
commit eb31318d39
3 changed files with 3 additions and 8 deletions
@@ -426,9 +426,7 @@ export const pkiSubscriberServiceFactory = ({
if (ca.internalCa?.status !== CaStatus.ACTIVE) throw new BadRequestError({ message: "CA is not active" });
if (!ca.internalCa?.activeCaCertId)
throw new BadRequestError({ message: "CA does not have a certificate installed" });
if (ca.disableDirectIssuance) {
throw new BadRequestError({ message: "Certificate template is required for issuance" });
}
const caCert = await certificateAuthorityCertDAL.findById(ca.internalCa.activeCaCertId);
const certificateManagerKmsId = await getProjectKmsCertificateKeyId({