package net.trajano.commons.testing.internal;

import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;

import javax.net.ssl.X509TrustManager;

/**
 * Trust manager that does not perform any checks.
 */
public class NullX509TrustManager implements X509TrustManager {
	/**
	 * Does nothing.
	 * 
	 * @param chain
	 *            certificate chain
	 * @param authType
	 *            authentication type
	 */
	public void checkClientTrusted(final X509Certificate[] chain,
			final String authType) throws CertificateException {
	}

	/**
	 * Does nothing.
	 * 
	 * @param chain
	 *            certificate chain
	 * @param authType
	 *            authentication type
	 */
	public void checkServerTrusted(final X509Certificate[] chain,
			final String authType) throws CertificateException {
	}

	/**
	 * Gets a list of accepted issuers.
	 * 
	 * @return empty array
	 */
	public X509Certificate[] getAcceptedIssuers() {
		return new X509Certificate[0];
	}
}

@@ -38,17 +38,19 @@
 nternal;
-%0A
+%0D%0A%0D
 %0Aimport 
@@ -89,16 +89,17 @@
 ception;
+%0D
 %0Aimport 
@@ -133,17 +133,19 @@
 ificate;
-%0A
+%0D%0A%0D
 %0Aimport 
@@ -179,13 +179,16 @@
 ger;
-%0A
+%0D%0A%0D
 %0A/**
+%0D
 %0A * 
@@ -238,12 +238,14 @@
 cks.
+%0D
 %0A */
+%0D
 %0Apub
@@ -304,21 +304,23 @@
 anager %7B
+%0D
 %0A%09/**
+%0D
 %0A%09 * Doe
@@ -321,37 +321,39 @@
  * Does nothing.
+%0D
 %0A%09 * 
+%0D
 %0A%09 * @param chai
@@ -345,32 +345,33 @@
 %09 * @param chain
+%0D
 %0A%09 *            
@@ -379,32 +379,33 @@
 ertificate chain
+%0D
 %0A%09 * @param auth
@@ -400,32 +400,33 @@
  @param authType
+%0D
 %0A%09 *            
@@ -436,37 +436,51 @@
 hentication type
+%0D
 %0A%09 */
+%0D%0A%09@Override%0D
 %0A%09public void ch
@@ -518,32 +518,33 @@
 ificate%5B%5D chain,
+%0D
 %0A%09%09%09final String
@@ -579,33 +579,56 @@
 eException %7B
-%0A%09%7D%0A
+%0D%0A%09%09// Does nothing%0D%0A%09%7D%0D%0A%0D
 %0A%09/**
+%0D
 %0A%09 * Does no
@@ -633,21 +633,23 @@
 nothing.
+%0D
 %0A%09 * 
+%0D
 %0A%09 * @pa
@@ -653,24 +653,25 @@
 @param chain
+%0D
 %0A%09 *        
@@ -691,16 +691,17 @@
 te chain
+%0D
 %0A%09 * @pa
@@ -712,16 +712,17 @@
 authType
+%0D
 %0A%09 *    
@@ -748,21 +748,35 @@
 ion type
+%0D
 %0A%09 */
+%0D%0A%09@Override%0D
 %0A%09public
@@ -830,16 +830,17 @@
 %5D chain,
+%0D
 %0A%09%09%09fina
@@ -891,17 +891,40 @@
 on %7B
-%0A%09%7D%0A
+%0D%0A%09%09// Does nothing%0D%0A%09%7D%0D%0A%0D
 %0A%09/**
+%0D
 %0A%09 *
@@ -956,21 +956,23 @@
 issuers.
+%0D
 %0A%09 * 
+%0D
 %0A%09 * @re
@@ -987,21 +987,35 @@
 ty array
+%0D
 %0A%09 */
+%0D%0A%09@Override%0D
 %0A%09public
@@ -1055,16 +1055,17 @@
 uers() %7B
+%0D
 %0A%09%09retur
@@ -1093,10 +1093,32 @@
 %5B0%5D;
+%0D%0A%09%09// Does nothing%0D
 %0A%09%7D
+%0D
 %0A%7D
+%0D
 %0A

Add "does nothing" comment