这是一个关于J2EE的开源包common里的许多组件的示例应用程序,可以借鉴.

源代码在线查看: myx509trustmanager.java

软件大小: 7085 K
上传用户: wjm197811
关键词: common J2EE 开源 应用程序
下载地址: 免注册下载 普通下载 VIP

相关代码

				package httpsClient;
				
				import java.security.cert.CertificateException;
				import java.security.cert.X509Certificate;
				
				import javax.net.ssl.X509TrustManager;
				
				public class MyX509TrustManager implements X509TrustManager {
				
					/* (non-Javadoc)
					 * @see javax.net.ssl.X509TrustManager#checkClientTrusted(java.security.cert.X509Certificate[], java.lang.String)
					 */
					public void checkClientTrusted(X509Certificate[] arg0, String arg1)
						throws CertificateException {
				
					}
				
					/* (non-Javadoc)
					 * @see javax.net.ssl.X509TrustManager#checkServerTrusted(java.security.cert.X509Certificate[], java.lang.String)
					 */
					public void checkServerTrusted(X509Certificate[] arg0, String arg1)
						throws CertificateException {
				
					}
				
					/* (non-Javadoc)
					 * @see javax.net.ssl.X509TrustManager#getAcceptedIssuers()
					 */
					public X509Certificate[] getAcceptedIssuers() {
						return null;
					}
				
				}
							

相关资源