public class X509CertUtils extends Object
| Constructor and Description |
|---|
X509CertUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Base64URL |
computeSHA256Thumbprint(X509Certificate cert)
Computes the X.509 certificate SHA-256 thumbprint (
x5t#S256). |
static X509Certificate |
parse(byte[] derEncodedCert)
Parses a DER-encoded X.509 certificate.
|
static X509Certificate |
parse(String pemEncodedCert)
Parses a PEM-encoded X.509 certificate.
|
static String |
toPEMString(X509Certificate cert)
Returns the specified X.509 certificate as PEM-encoded string.
|
static String |
toPEMString(X509Certificate cert,
boolean withLineBreaks)
Returns the specified X.509 certificate as PEM-encoded string.
|
public X509CertUtils()
public static X509Certificate parse(byte[] derEncodedCert)
derEncodedCert - The DER-encoded X.509 certificate, as a byte
array. May be null.null if parsing failed.public static X509Certificate parse(String pemEncodedCert)
pemEncodedCert - The PEM-encoded X.509 certificate, as a
string. May be null.null if parsing failed.public static String toPEMString(X509Certificate cert)
cert - The X.509 certificate. Must not be null.null if encoding
failed.public static String toPEMString(X509Certificate cert, boolean withLineBreaks)
cert - The X.509 certificate. Must not be
null.withLineBreaks - false to suppress line breaks.null if encoding
failed.public static Base64URL computeSHA256Thumbprint(X509Certificate cert)
x5t#S256).cert - The X.509 certificate. Must not be null.null if
a certificate encoding exception is encountered.Copyright © 2018 Connect2id Ltd.. All rights reserved.