io.sureshg.extn / java.security.cert.X509Certificate

Extensions for java.security.cert.X509Certificate

info

fun X509Certificate.info(): String

Returns short cert info string suitable for printing. For SAN, it returns the GenericName pair -> Filtering the string names and indents the list to display properly.

readCRLs

fun X509Certificate.readCRLs(): List<X509CRL>

Returns CRLs described in a X509Certificate's CRLDistributionPoints Extension. Only those containing a general name of type URI are read. ToDo - Different name should point to same CRL.

selfSigned

val X509Certificate.selfSigned: Boolean

Returns true if the certificate is self-signed, false otherwise.

signedBy

fun X509Certificate.signedBy(ca: X509Certificate): Boolean

Returns true if the certificate is signed by the given ca cert., false otherwise.