Class CertificateEntityUtils


  • public class CertificateEntityUtils
    extends Object
    Since:
    8.5.4
    Author:
    Norman Lorenz
    • Method Detail

      • healCertificateEntity

        public static boolean healCertificateEntity​(CertificateEntity entity)
      • resolveValidDn

        public static String resolveValidDn​(String raw,
                                            byte[] certificateData,
                                            boolean subject)
        Returns the given distinguished name if it is valid, otherwise the subject or issuer distinguished name parsed from the encoded certificate.
        Parameters:
        raw - the persisted distinguished name.
        certificateData - the encoded certificate, used as fallback.
        subject - true to resolve the subject, false to resolve the issuer.
        Returns:
        the resolved distinguished name, or raw if no valid distinguished name could be resolved.
        Since:
        8.6.0
      • isValidDn

        public static boolean isValidDn​(String dn)
        Parameters:
        dn - the distinguished name to check.
        Returns:
        whether the given distinguished name is not blank and can be parsed.
        Since:
        8.6.0