org.w3c.mwi.mobileok.basic
Class MobileOKTrustManager
java.lang.Object
org.w3c.mwi.mobileok.basic.MobileOKTrustManager
- All Implemented Interfaces:
- javax.net.ssl.TrustManager, javax.net.ssl.X509TrustManager
public class MobileOKTrustManager
- extends java.lang.Object
- implements javax.net.ssl.X509TrustManager
Trust manager that checks the validity of an X509 server certificate against
the mobileOK trust rules defined in the
HTTPS section
of the
W3C mobileOK Basic Tests 1.0
standard.
The class should be set as the trust manager of the SSLContext
through a call to SSLContext.init(javax.net.ssl.KeyManager[], javax.net.ssl.TrustManager[], java.security.SecureRandom)
before creating the secure socket to the server.
Since arbitrary root certificates are to be regarded as trusted in mobileOK,
the class merely checks that the server certificate associated with the
secure socket is currently valid (i.e. that current date lays between the
certificate's activation and expiration dates).
- Version:
- $Revision: 1.1 $
- Author:
- The W3C mobileOK Checker Task Force
- See Also:
MobileOKSSLProtocolSocketFactory
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
httperror
private HTTPErrorsType httperror
acceptedIssuers
private static final java.security.cert.X509Certificate[] acceptedIssuers
MobileOKTrustManager
public MobileOKTrustManager()
checkClientTrusted
public void checkClientTrusted(java.security.cert.X509Certificate[] chain,
java.lang.String authType)
- Specified by:
checkClientTrusted
in interface javax.net.ssl.X509TrustManager
checkServerTrusted
public void checkServerTrusted(java.security.cert.X509Certificate[] chain,
java.lang.String authType)
- Specified by:
checkServerTrusted
in interface javax.net.ssl.X509TrustManager
getAcceptedIssuers
public java.security.cert.X509Certificate[] getAcceptedIssuers()
- Specified by:
getAcceptedIssuers
in interface javax.net.ssl.X509TrustManager
getHttperror
public HTTPErrorsType getHttperror()