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. |
String |
getPrivateKey() |
KeySpec |
getPrivateKeySpec()
Retrieve the private key as
KeySpec. |
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.Copyright © 2016–2020 Pivotal Software, Inc.. All rights reserved.