Package eu.emi.security.authn.x509.impl
Class X509Formatter
java.lang.Object
eu.emi.security.authn.x509.impl.X509Formatter
Utility allowing for converting certificates to various text representations.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private final FormatMode
private static final String[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
appendAltNames
(StringBuilder sb, String info, String sep, Collection<List<?>> altNames) format
(X509Certificate cert) Produces a human readable text representation of the provided certificate.format
(X509Certificate[] certChain) Produces a human readable text representation of the provided certificate chain.format
(X509Certificate[] certChain, boolean preamble) Produces a human readable text representation of the provided certificate chain.
-
Field Details
-
mode
-
USAGES
-
EKU
- See Also:
-
EXT_USAGES
-
-
Constructor Details
-
X509Formatter
Creates a new X509Formatter object- Parameters:
mode
- the formatting mode that will be used by this object.
-
-
Method Details
-
format
Produces a human readable text representation of the provided certificate.- Parameters:
cert
- input certificate- Returns:
- the text representation
-
appendAltNames
private void appendAltNames(StringBuilder sb, String info, String sep, Collection<List<?>> altNames) -
format
Produces a human readable text representation of the provided certificate chain.- Parameters:
certChain
- input certificates- Returns:
- the text representation
-
format
Produces a human readable text representation of the provided certificate chain.- Parameters:
certChain
- input certificatespreamble
- whether to print a first line with an information on the number of elements.- Returns:
- the text representation
-