Skip to main content
summaryrefslogtreecommitdiffstats
blob: 836c6bc10489d9bd688d2bc9ff1cc2333e0f9c35 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*******************************************************************************
 * Copyright (c) 2003 - 2005 University Of British Columbia 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:
 *     University Of British Columbia - initial API and implementation
 *******************************************************************************/
package org.eclipse.mylar.bugzilla.core;

import javax.net.ssl.X509TrustManager;

/**
* TrustAll class implements X509TrustManager to access all https servers with signed and 
* unsigned certificates.
*/
public class TrustAll implements X509TrustManager 
{
	// seems to be no purpose
	public boolean checkClientTrusted(java.security.cert.X509Certificate[] chain) 
	{
		return true;
	}
	
	// seems to be no purpose
	public boolean isServerTrusted(java.security.cert.X509Certificate[] chain) 
	{
		return true;
	}
	
	// seems to be no purpose
	public boolean isClientTrusted(java.security.cert.X509Certificate[] chain) 
	{
		return true;
	}
	
	/**
	 * @see javax.net.ssl.X509TrustManager#getAcceptedIssuers()
	 */
	public java.security.cert.X509Certificate[] getAcceptedIssuers() 
	{
		return null;
	}
	
	/**
	 * @see javax.net.ssl.X509TrustManager#checkClientTrusted(java.security.cert.X509Certificate[], java.lang.String)
	 */
	public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) 
	{
		// don't need to do any checks
	}
	
	/**
	 * @see javax.net.ssl.X509TrustManager#checkServerTrusted(java.security.cert.X509Certificate[], java.lang.String)
	 */
	public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) 
	{
		// don't need to do any checks
	}
}

Back to the top