public final class CertificateUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
convertToPem(Certificate certificate) |
static List<String> |
convertToPem(List<X509Certificate> certificates) |
static String |
generateAlias(Certificate certificate) |
static Map<String,List<X509Certificate>> |
getCertificate(List<String> urls) |
static Map<String,List<X509Certificate>> |
getCertificate(String... urls) |
static Map<String,List<String>> |
getCertificateAsPem(List<String> urls) |
static Map<String,List<String>> |
getCertificateAsPem(String... urls) |
static List<X509Certificate> |
getJdkTrustedCertificates() |
static List<X509Certificate> |
getSystemTrustedCertificates() |
static List<Certificate> |
loadCertificate(InputStream... certificateStreams)
Loads certificates from multiple InputStreams and maps it into a list of
Certificate. |
static List<Certificate> |
loadCertificate(Path... certificatePaths)
Loads certificates from the filesystem and maps it into a list of
Certificate. |
static List<Certificate> |
loadCertificate(String... certificatePaths)
Loads certificates from the classpath and maps it into a list of
Certificate. |
static List<Certificate> |
parseDerCertificate(InputStream certificateStream) |
static List<Certificate> |
parseP7bCertificate(String certificateContent)
Parses P7B formatted certificates containing a
header as -----BEGIN PKCS7----- and footer as -----END PKCS7-----
with a base64 encoded data between the header and footer.
|
static List<Certificate> |
parsePemCertificate(String certificateContent)
Parses PEM formatted certificates containing a
header as -----BEGIN CERTIFICATE----- and footer as -----END CERTIFICATE-----
or header as -----BEGIN PKCS7----- and footer as -----END PKCS7-----
with a base64 encoded data between the header and footer.
|
public static String generateAlias(Certificate certificate)
public static List<Certificate> loadCertificate(String... certificatePaths)
Certificate.
public static List<Certificate> loadCertificate(Path... certificatePaths)
Certificate.
public static List<Certificate> loadCertificate(InputStream... certificateStreams)
Certificate.
public static List<Certificate> parsePemCertificate(String certificateContent)
public static List<Certificate> parseP7bCertificate(String certificateContent)
public static List<Certificate> parseDerCertificate(InputStream certificateStream)
public static List<X509Certificate> getJdkTrustedCertificates()
public static List<X509Certificate> getSystemTrustedCertificates()
public static Map<String,List<X509Certificate>> getCertificate(String... urls)
public static List<String> convertToPem(List<X509Certificate> certificates)
public static String convertToPem(Certificate certificate)
Copyright © 2022. All rights reserved.