|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.tools.PromptTrustManager
public class PromptTrustManager
This class provides an implementation of an X.509 trust manager which will
interactively prompt the user (via the CLI) whether a given certificate
should be trusted. It should only be used by interactive command-line tools,
since it will block until it gets a response from the user.
Note that this class is only intended for client-side use, and therefore may
not be used by a server to determine whether a client certificate is trusted.
Method Summary | |
---|---|
void |
checkClientTrusted(java.security.cert.X509Certificate[] chain,
java.lang.String authType)
Determines whether an SSL client with the provided certificate chain should be trusted. |
void |
checkServerTrusted(java.security.cert.X509Certificate[] chain,
java.lang.String authType)
Determines whether an SSL server with the provided certificate chain should be trusted. |
java.security.cert.X509Certificate[] |
getAcceptedIssuers()
Retrieves the set of certificate authority certificates which are trusted for authenticating peers. |
static javax.net.ssl.TrustManager[] |
getTrustManagers()
Retrieves the trust manager array that should be used to initialize an SSL context in cases where the user should be interactively prompted about whether to trust the server certificate. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static javax.net.ssl.TrustManager[] getTrustManagers()
public void checkClientTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType) throws java.security.cert.CertificateException
checkClientTrusted
in interface javax.net.ssl.X509TrustManager
chain
- The certificate chain for the SSL client.authType
- The authentication type based on the client certificate.
java.security.cert.CertificateException
- To indicate that the provided client
certificate is not trusted.public void checkServerTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType) throws java.security.cert.CertificateException
checkServerTrusted
in interface javax.net.ssl.X509TrustManager
chain
- The certificate chain for the SSL server.authType
- The key exchange algorithm used.
java.security.cert.CertificateException
- If the user rejects the certificate.public java.security.cert.X509Certificate[] getAcceptedIssuers()
getAcceptedIssuers
in interface javax.net.ssl.X509TrustManager
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |