|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jini.jeri.ssl.Utilities
net.jini.jeri.ssl.FilterX509TrustManager
class FilterX509TrustManager
Implements an X509TrustManager that only trusts certificate chains whose first certificate identifies one of a set of principals.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.jini.jeri.ssl.Utilities |
---|
Utilities.SSLContextInfo |
Field Summary | |
---|---|
private static Object |
lock
Use for synchronizing initialization of the trustManager field. |
private Set |
principals
The set of permitted remote principals, or null if no restriction. |
private static X509TrustManager |
trustManager
The trust manager to delegate to. |
private static String |
trustManagerFactoryAlgorithm
The trust manager factory algorithm. |
Fields inherited from class net.jini.jeri.ssl.Utilities |
---|
ANY_KEY_ALGORITHM, clientLogger, DSA_KEY_ALGORITHM, getSubjectPermission, initLogger, INTEGRITY_PREFERRED, INTEGRITY_REQUIRED, RSA_KEY_ALGORITHM, serverLogger, UNKNOWN_PRINCIPAL |
Constructor Summary | |
---|---|
FilterX509TrustManager(Set principals)
Creates an X509TrustManager that only trusts certificate chains whose first certificate identifies one of a set of principals. |
Method Summary | |
---|---|
private void |
check(X509Certificate[] chain)
Make sure the subject of the leaf certificate is one of the permitted principals. |
void |
checkClientTrusted(X509Certificate[] chain,
String authType)
|
void |
checkServerTrusted(X509Certificate[] chain,
String authType)
|
X509Certificate[] |
getAcceptedIssuers()
|
private static X509TrustManager |
getTrustManager()
Returns the X509TrustManager to delegate to. |
(package private) void |
setPermittedRemotePrincipals(Set principals)
Specifies the set of permitted remote principals. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static X509TrustManager trustManager
private static final Object lock
private static final String trustManagerFactoryAlgorithm
private Set principals
Constructor Detail |
---|
FilterX509TrustManager(Set principals) throws NoSuchAlgorithmException
principals
- the set of permitted remote principals, or null if no
restriction
NoSuchAlgorithmException
- if the trust manager factory algorithm
is not foundMethod Detail |
---|
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException
checkClientTrusted
in interface X509TrustManager
CertificateException
public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException
checkServerTrusted
in interface X509TrustManager
CertificateException
public X509Certificate[] getAcceptedIssuers()
getAcceptedIssuers
in interface X509TrustManager
void setPermittedRemotePrincipals(Set principals)
principals
- the set of permitted remote principals, or null if no
restrictionprivate void check(X509Certificate[] chain) throws CertificateException
CertificateException
private static X509TrustManager getTrustManager() throws NoSuchAlgorithmException
NoSuchAlgorithmException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |