com.kodemuse.security.ssl
Class TrustStore
java.lang.Object
|
+--com.kodemuse.security.ssl.LogCapability
|
+--com.kodemuse.security.ssl.TrustStore
- public class TrustStore
- extends com.kodemuse.security.ssl.LogCapability
Contains the list of certificates trusted by the server. In the
mutual authentication mode, the certificate recieved must be either
issued by or must be one of the certificates in the trust store.
- Author:
- Harmeet Bedi
Constructor Summary |
TrustStore(java.io.File trustStore)
file containing trusted certificates in base64 format |
TrustStore(java.lang.String trustStore)
file containing trusted certificates in base64 format |
Method Summary |
java.security.cert.X509Certificate[] |
getCertificates()
|
boolean |
isTrusted(java.security.cert.X509Certificate[] peerCert)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TrustStore
public TrustStore(java.lang.String trustStore)
throws java.lang.Exception
- file containing trusted certificates in base64 format
TrustStore
public TrustStore(java.io.File trustStore)
throws java.lang.Exception
- file containing trusted certificates in base64 format
isTrusted
public boolean isTrusted(java.security.cert.X509Certificate[] peerCert)
throws java.security.cert.CertificateEncodingException,
java.security.cert.CertificateException,
java.security.NoSuchProviderException,
java.security.NoSuchAlgorithmException,
java.security.InvalidKeyException
getCertificates
public java.security.cert.X509Certificate[] getCertificates()
throws java.security.cert.CertificateException,
java.security.NoSuchProviderException