Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

585 B
Raw Blame
import { CaType } from "./enums";

export type CaIssuanceCapabilities = {
  requiresHsm: boolean;
  supportsExistingOrderReuse: boolean;
  minRsaKeyBits?: number;
};

export const isScepRaCaSigningSupported = (caType?: CaType): boolean => caType === CaType.INTERNAL;

export const getCaIssuanceCapabilities = (caType?: CaType): CaIssuanceCapabilities => {
  switch (caType) {
    case CaType.DIGICERT:
      return { requiresHsm: true, supportsExistingOrderReuse: true, minRsaKeyBits: 3072 };
    default:
      return { requiresHsm: false, supportsExistingOrderReuse: false };
  }
};