diff options
Diffstat (limited to 'org.eclipse.mylyn.commons.repositories.http.core/src/org/eclipse/mylyn/internal/commons/http/TrustAllTrustManager.java')
-rw-r--r-- | org.eclipse.mylyn.commons.repositories.http.core/src/org/eclipse/mylyn/internal/commons/http/TrustAllTrustManager.java | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.commons.repositories.http.core/src/org/eclipse/mylyn/internal/commons/http/TrustAllTrustManager.java b/org.eclipse.mylyn.commons.repositories.http.core/src/org/eclipse/mylyn/internal/commons/http/TrustAllTrustManager.java new file mode 100644 index 00000000..de55cd20 --- /dev/null +++ b/org.eclipse.mylyn.commons.repositories.http.core/src/org/eclipse/mylyn/internal/commons/http/TrustAllTrustManager.java @@ -0,0 +1,35 @@ +/******************************************************************************* + * Copyright (c) 2004, 2008 Tasktop Technologies and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Tasktop Technologies - initial API and implementation + * Eugene Kuleshov - improvements + *******************************************************************************/ + +package org.eclipse.mylyn.internal.commons.http; + +import javax.net.ssl.X509TrustManager; + +/** + * TrustAll class implements X509TrustManager to access all https servers with signed and unsigned certificates. + * + * @author Mik Kersten + */ +public class TrustAllTrustManager implements X509TrustManager { + + public java.security.cert.X509Certificate[] getAcceptedIssuers() { + return null; + } + + public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) { + // don't need to do any checks + } + + public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) { + // don't need to do any checks + } +} |