Class Certificates


  • public class Certificates
    extends java.lang.Object
    Utility class for dealing with certificates
    Author:
    Stuart Douglas
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String BEGIN_CERT  
      static java.lang.String END_CERT  
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static java.lang.String toPem​(java.security.cert.Certificate certificate)
      Converts a certificate to PEM format.
      static java.lang.String toPem​(javax.security.cert.X509Certificate certificate)
      Deprecated, for removal: This API element is subject to removal in a future version.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • toPem

        @Deprecated(since="2.3.0",
                    forRemoval=true)
        public static java.lang.String toPem​(javax.security.cert.X509Certificate certificate)
                                      throws javax.security.cert.CertificateEncodingException
        Deprecated, for removal: This API element is subject to removal in a future version.
        Throws:
        javax.security.cert.CertificateEncodingException
      • toPem

        public static java.lang.String toPem​(java.security.cert.Certificate certificate)
                                      throws java.security.cert.CertificateEncodingException
        Converts a certificate to PEM format.
        Parameters:
        certificate - the Certificate to recode
        Returns:
        The Certificate in PEM format.
        Throws:
        java.security.cert.CertificateEncodingException - thrown if an encoding error occurs.