public class GECATrustManager
extends java.lang.Object
implements javax.net.ssl.X509TrustManager
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CA_ALIAS
alias for the ca certificate
|
| Constructor and Description |
|---|
GECATrustManager() |
GECATrustManager(java.io.File caTop)
Creates a new instance of GECATrustManager.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkClientTrusted(java.security.cert.X509Certificate[] chain,
java.lang.String authType)
Given the partial or complete certificate chain provided by the
peer, build a certificate path to a trusted root and return if
it can be validated and is trusted for client SSL
authentication based on the authentication type.
|
void |
checkServerTrusted(java.security.cert.X509Certificate[] chain,
java.lang.String authType)
Given the partial or complete certificate chain provided by the
peer, build a certificate path to a trusted root and return if
it can be validated and is trusted for server SSL
authentication based on the authentication type.
|
java.security.cert.X509Certificate[] |
getAcceptedIssuers()
Return an array of certificate authority certificates
which are trusted for authenticating peers.
|
boolean |
isValidMessage(java.lang.String username,
byte[] message,
byte[] signature,
java.lang.String algorithm)
Validate a message of a user.
|
void |
setCaTop(java.io.File caTop)
set a new caTop directory
|
public static final java.lang.String CA_ALIAS
public GECATrustManager()
public GECATrustManager(java.io.File caTop)
caTop - ca top directory of the grid engine capublic void setCaTop(java.io.File caTop)
caTop - public boolean isValidMessage(java.lang.String username,
byte[] message,
byte[] signature,
java.lang.String algorithm)
username - name of the usermessage - the messagesignature - the signaturealgorithm - the digest algorithmtrue if the message is validpublic void checkClientTrusted(java.security.cert.X509Certificate[] chain,
java.lang.String authType)
throws java.security.cert.CertificateException
checkClientTrusted in interface javax.net.ssl.X509TrustManagerchain - the peer certificate chainauthType - the authentication type based on the client certificatejava.lang.IllegalArgumentException - if null or zero-length chain
is passed in for the chain parameter or if null or zero-length
string is passed in for the authType parameterjava.security.cert.CertificateException - if the certificate chain is not trusted
by this TrustManager.public void checkServerTrusted(java.security.cert.X509Certificate[] chain,
java.lang.String authType)
throws java.security.cert.CertificateException
checkServerTrusted in interface javax.net.ssl.X509TrustManagerchain - the peer certificate chainauthType - the key exchange algorithm usedjava.lang.IllegalArgumentException - if null or zero-length chain
is passed in for the chain parameter or if null or zero-length
string is passed in for the authType parameterjava.security.cert.CertificateException - if the certificate chain is not trusted
by this TrustManager.public java.security.cert.X509Certificate[] getAcceptedIssuers()
getAcceptedIssuers in interface javax.net.ssl.X509TrustManager