public class CertificateBundle extends Certificate
KeySpec and
X509Certificate.getPrivateKeySpec(),
Certificate.getX509Certificate(),
Certificate.getIssuingCaCertificate()| Modifier and Type | Method and Description |
|---|---|
KeyStore |
createKeyStore(String keyAlias)
Create a
KeyStore from this CertificateBundle containing the
private key and certificate chain. |
KeyStore |
createKeyStore(String keyAlias,
boolean includeCaChain)
Create a
KeyStore from this CertificateBundle containing the
private key and certificate chain. |
String |
getPrivateKey() |
KeySpec |
getPrivateKeySpec()
Retrieve the private key as
KeySpec. |
List<X509Certificate> |
getX509IssuerCertificates()
Retrieve the issuing CA certificates as list of
X509Certificate. |
static CertificateBundle |
of(String serialNumber,
String certificate,
String issuingCaCertificate,
String privateKey)
Create a
CertificateBundle given a private key with certificates and the
serial number. |
createTrustStore, getCertificate, getIssuingCaCertificate, getSerialNumber, getX509Certificate, getX509IssuerCertificate, ofpublic static CertificateBundle of(String serialNumber, String certificate, String issuingCaCertificate, String privateKey)
CertificateBundle given a private key with certificates and the
serial number.serialNumber - must not be empty or null.certificate - must not be empty or null.issuingCaCertificate - must not be empty or null.privateKey - must not be empty or null.CertificateBundlepublic String getPrivateKey()
public KeySpec getPrivateKeySpec()
KeySpec. Only supported if private key is
DER-encoded.KeySpec. KeyFactory can generate
a PrivateKey from this KeySpec.public KeyStore createKeyStore(String keyAlias)
KeyStore from this CertificateBundle containing the
private key and certificate chain. Only supported if certificate and private key
are DER-encoded.keyAlias - the key alias to use.KeyStore containing the private key and certificate chain.public KeyStore createKeyStore(String keyAlias, boolean includeCaChain)
KeyStore from this CertificateBundle containing the
private key and certificate chain. Only supported if certificate and private key
are DER-encoded.keyAlias - the key alias to use.includeCaChain - whether to include the certificate authority chain instead of
just the issuer certificate.KeyStore containing the private key and certificate chain.public List<X509Certificate> getX509IssuerCertificates()
X509Certificate. Only
supported if certificates are DER-encoded.X509Certificate.Copyright © 2016–2024 Pivotal Software, Inc.. All rights reserved.