mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-19 23:23:59 +00:00
Add self-sign certs support
This commit is contained in:
@@ -309,6 +309,14 @@ export const certificateServiceFactory = ({
|
||||
|
||||
const certBody = await certificateBodyDAL.findOne({ certId: cert.id });
|
||||
|
||||
if (!certBody) {
|
||||
throw new NotFoundError({ message: "Certificate body not found" });
|
||||
}
|
||||
|
||||
if (!certBody.encryptedCertificate) {
|
||||
throw new BadRequestError({ message: "Certificate data not available" });
|
||||
}
|
||||
|
||||
const certificateManagerKeyId = await getProjectKmsCertificateKeyId({
|
||||
projectId: cert.projectId,
|
||||
projectDAL,
|
||||
@@ -599,6 +607,14 @@ export const certificateServiceFactory = ({
|
||||
|
||||
const certBody = await certificateBodyDAL.findOne({ certId: cert.id });
|
||||
|
||||
if (!certBody) {
|
||||
throw new NotFoundError({ message: "Certificate body not found" });
|
||||
}
|
||||
|
||||
if (!certBody.encryptedCertificate) {
|
||||
throw new BadRequestError({ message: "Certificate data not available" });
|
||||
}
|
||||
|
||||
const certificateManagerKeyId = await getProjectKmsCertificateKeyId({
|
||||
projectId: cert.projectId,
|
||||
projectDAL,
|
||||
|
||||
Reference in New Issue
Block a user