Class CertificateEntityUtils
- java.lang.Object
-
- de.xima.fc.certificate.ms.impl.util.CertificateEntityUtils
-
public class CertificateEntityUtils extends Object
- Since:
- 8.5.4
- Author:
- Norman Lorenz
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanhealCertificateEntity(CertificateEntity entity)static booleanisValidDn(String dn)static StringresolveValidDn(CertificateEntity source, boolean subject)static StringresolveValidDn(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.
-
-
-
Method Detail
-
healCertificateEntity
public static boolean healCertificateEntity(CertificateEntity entity)
-
resolveValidDn
public static String resolveValidDn(CertificateEntity source, boolean subject)
-
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-trueto resolve the subject,falseto resolve the issuer.- Returns:
- the resolved distinguished name, or
rawif 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
-
-