public class DefaultCertificateManager extends Object implements CertificateManager
| Constructor and Description |
|---|
DefaultCertificateManager() |
DefaultCertificateManager(KeyPair keyPair,
X509Certificate certificate) |
DefaultCertificateManager(KeyPair keyPair,
X509Certificate[] certificateChain) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(KeyPair keyPair,
X509Certificate certificate)
Add a
KeyPair and associated X509Certificate to this certificate manager. |
void |
add(KeyPair keyPair,
X509Certificate[] certificateChain)
Add a
KeyPair and associated X509Certificate chain to this certificate manager. |
Optional<X509Certificate> |
getCertificate(ByteString thumbprint)
Get the
X509Certificate identified by thumbprint. |
Optional<X509Certificate[]> |
getCertificateChain(ByteString thumbprint)
Get the
X509Certificate identified by thumbprint as well as any certificates in its chain. |
Set<X509Certificate> |
getCertificates() |
Optional<KeyPair> |
getKeyPair(ByteString thumbprint)
Get the
KeyPair belonging to the certificate identified by thumbprint. |
Set<KeyPair> |
getKeyPairs() |
void |
remove(ByteString thumbprint) |
void |
replace(ByteString thumbprint,
KeyPair keyPair,
X509Certificate[] certificateChain) |
public DefaultCertificateManager()
public DefaultCertificateManager(KeyPair keyPair, X509Certificate certificate)
public DefaultCertificateManager(KeyPair keyPair, X509Certificate[] certificateChain)
public void add(KeyPair keyPair, X509Certificate certificate)
KeyPair and associated X509Certificate to this certificate manager.keyPair - the KeyPair containing with the public and private key.certificate - the X509Certificate the key pair is associated with.public void add(KeyPair keyPair, X509Certificate[] certificateChain)
KeyPair and associated X509Certificate chain to this certificate manager.keyPair - the KeyPair containing the public and private key.certificateChain - the X509Certificate chain the key pair is associated with.public void remove(ByteString thumbprint)
public void replace(ByteString thumbprint, KeyPair keyPair, X509Certificate[] certificateChain)
public Optional<KeyPair> getKeyPair(ByteString thumbprint)
CertificateManagerKeyPair belonging to the certificate identified by thumbprint.
thumbprint is a SHA1 hash of the encoded certificate.
getKeyPair in interface CertificateManagerthumbprint - the thumbprint of the certificate.KeyPair belonging to the certificate identified by thumbprint.public Optional<X509Certificate> getCertificate(ByteString thumbprint)
CertificateManagerX509Certificate identified by thumbprint.
thumbprint is a SHA1 hash of the encoded certificate.
getCertificate in interface CertificateManagerthumbprint - the thumbprint of the certificate.X509Certificate identified by thumbprint.public Optional<X509Certificate[]> getCertificateChain(ByteString thumbprint)
CertificateManagerX509Certificate identified by thumbprint as well as any certificates in its chain.getCertificateChain in interface CertificateManagerthumbprint - the thumbprint of the certificate.X509Certificate identified by thumbprint as well as any certificates in its chain.public Set<KeyPair> getKeyPairs()
getKeyPairs in interface CertificateManagerKeyPairs.public Set<X509Certificate> getCertificates()
getCertificates in interface CertificateManagerX509Certificates.Copyright © 2025. All rights reserved.