mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-03 05:25:56 +00:00
misc: addressed CA status issue
This commit is contained in:
+1
-1
@@ -59,7 +59,7 @@ export const InternalCertificateAuthorityFns = ({
|
|||||||
subscriber: TPkiSubscribers,
|
subscriber: TPkiSubscribers,
|
||||||
ca: Awaited<ReturnType<TCertificateAuthorityDALFactory["findByIdWithAssociatedCa"]>>
|
ca: Awaited<ReturnType<TCertificateAuthorityDALFactory["findByIdWithAssociatedCa"]>>
|
||||||
) => {
|
) => {
|
||||||
if (ca.internalCa?.status !== CaStatus.ACTIVE) throw new BadRequestError({ message: "CA is not active" });
|
if (ca.status !== CaStatus.ACTIVE) throw new BadRequestError({ message: "CA is not active" });
|
||||||
if (!ca.internalCa?.activeCaCertId)
|
if (!ca.internalCa?.activeCaCertId)
|
||||||
throw new BadRequestError({ message: "CA does not have a certificate installed" });
|
throw new BadRequestError({ message: "CA does not have a certificate installed" });
|
||||||
|
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ export const pkiSubscriberServiceFactory = ({
|
|||||||
throw new BadRequestError({ message: "CA does not support ordering of certificates" });
|
throw new BadRequestError({ message: "CA does not support ordering of certificates" });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ca.externalCa?.status !== CaStatus.ACTIVE) {
|
if (ca.status !== CaStatus.ACTIVE) {
|
||||||
throw new BadRequestError({ message: "CA is disabled" });
|
throw new BadRequestError({ message: "CA is disabled" });
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -423,7 +423,7 @@ export const pkiSubscriberServiceFactory = ({
|
|||||||
|
|
||||||
if (subscriber.status !== PkiSubscriberStatus.ACTIVE)
|
if (subscriber.status !== PkiSubscriberStatus.ACTIVE)
|
||||||
throw new BadRequestError({ message: "Subscriber is not active" });
|
throw new BadRequestError({ message: "Subscriber is not active" });
|
||||||
if (ca.internalCa?.status !== CaStatus.ACTIVE) throw new BadRequestError({ message: "CA is not active" });
|
if (ca.status !== CaStatus.ACTIVE) throw new BadRequestError({ message: "CA is not active" });
|
||||||
if (!ca.internalCa?.activeCaCertId)
|
if (!ca.internalCa?.activeCaCertId)
|
||||||
throw new BadRequestError({ message: "CA does not have a certificate installed" });
|
throw new BadRequestError({ message: "CA does not have a certificate installed" });
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user