public class JKSTrustStore extends Object implements PKITrustStore
NB! Certificate is trusted if valid certificate path can be built starting from input certificate and up to trust anchor in JKS file.
NB! This implementation does not check certificate revocation information.
Constructor and Description |
---|
JKSTrustStore(KeyStore keyStore,
CertSelector certSelector)
Creates new instance with given java key store.
|
JKSTrustStore(String keyStore,
CertSelector certSelector)
Creates new instance with given java key store path.
|
JKSTrustStore(String keyStorePath,
char[] password,
CertSelector certSelector)
Creates new instance with given java key store path and password.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isTrusted(X509Certificate certificate,
org.bouncycastle.util.Store certStore)
This method is used to check if certificate is trusted or not.
|
public JKSTrustStore(KeyStore keyStore, CertSelector certSelector) throws InvalidKeyStoreException
keyStore
- java key store to usecertSelector
- if present then all certificates that will be checked must with this certificate selectorInvalidKeyStoreException
public JKSTrustStore(String keyStorePath, char[] password, CertSelector certSelector) throws InvalidKeyStoreException
keyStorePath
- java key store to loadpassword
- java key store passwordcertSelector
- if present then all certificates that will be checked must with this certificate selectorInvalidKeyStoreException
- if key store loading fails.public JKSTrustStore(String keyStore, CertSelector certSelector) throws InvalidKeyStoreException
NB! Does not use password.
keyStore
- java key store to loadcertSelector
- if present then all certificates that will be checked must with this certificate selectorInvalidKeyStoreException
- if key store loading fails.public boolean isTrusted(X509Certificate certificate, org.bouncycastle.util.Store certStore) throws CryptoException
isTrusted
in interface PKITrustStore
certificate
- instance of PKI X.509 certificate. not null.certStore
- additional certificates to be used to check if certificate chain is trusted or not.CryptoException
- will be thrown when exception occurs turning certificate path buildingCopyright © 2024 Guardtime. All rights reserved.