Class X509Formatter

java.lang.Object
eu.emi.security.authn.x509.impl.X509Formatter

public class X509Formatter extends Object
Utility allowing for converting certificates to various text representations.
Author:
K. Benedyczak
  • Constructor Details

    • X509Formatter

      public X509Formatter(FormatMode mode)
      Creates a new X509Formatter object
      Parameters:
      mode - the formatting mode that will be used by this object.
  • Method Details

    • format

      public String format(X509Certificate cert)
      Produces a human readable text representation of the provided certificate.
      Parameters:
      cert - input certificate
      Returns:
      the text representation
    • format

      public String format(X509Certificate[] certChain)
      Produces a human readable text representation of the provided certificate chain.
      Parameters:
      certChain - input certificates
      Returns:
      the text representation
    • format

      public String format(X509Certificate[] certChain, boolean preamble)
      Produces a human readable text representation of the provided certificate chain.
      Parameters:
      certChain - input certificates
      preamble - whether to print a first line with an information on the number of elements.
      Returns:
      the text representation