public class CertificateBundle extends Object
KeySpec and
X509Certificate.getPrivateKeySpec(),
getX509Certificate(),
getIssuingCaCertificate()| Modifier and Type | Method and Description |
|---|---|
KeyStore |
createKeyStore(String keyAlias)
Create a
KeyStore from this CertificateBundle containing the
private key and certificate chain. |
String |
getCertificate() |
String |
getIssuingCaCertificate() |
String |
getPrivateKey() |
KeySpec |
getPrivateKeySpec()
Retrieve the private key as
KeySpec. |
String |
getSerialNumber() |
X509Certificate |
getX509Certificate()
Retrieve the certificate as
X509Certificate. |
X509Certificate |
getX509IssuerCertificate()
Retrieve the issuing CA certificate as
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. |
public 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 getSerialNumber()
public String getCertificate()
public String getIssuingCaCertificate()
public String getPrivateKey()
public KeySpec getPrivateKeySpec()
KeySpec. Only supported if private key is
DER-encoded.KeySpec. KeyFactory can generate
a PrivateKey from this KeySpec.public X509Certificate getX509Certificate()
X509Certificate. Only supported if certificate
is DER-encoded.X509Certificate.public X509Certificate getX509IssuerCertificate()
X509Certificate. Only supported if
certificate is DER-encoded.X509Certificate.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.Copyright © 2016–2017 Pivotal Software, Inc.. All rights reserved.