001    package org.ujmp.core.util;
002    
003    import java.security.cert.CertificateException;
004    import java.security.cert.X509Certificate;
005    
006    import javax.net.ssl.X509TrustManager;
007    
008    public class DummyTrustManager implements X509TrustManager {
009            public boolean isClientTrusted(X509Certificate[] cert) {
010                    return true;
011            }
012    
013            public boolean isServerTrusted(X509Certificate[] cert) {
014                    return true;
015            }
016    
017            public X509Certificate[] getAcceptedIssuers() {
018                    return new X509Certificate[0];
019            }
020    
021            /*
022             * (non-Javadoc)
023             * 
024             * @see javax.net.ssl.X509TrustManager#checkClientTrusted(X509Certificate[],
025             * java.lang.String)
026             */
027            public void checkClientTrusted(X509Certificate[] arg0, String arg1) throws CertificateException {
028    
029            }
030    
031            /*
032             * (non-Javadoc)
033             * 
034             * @see javax.net.ssl.X509TrustManager#checkServerTrusted(X509Certificate[],
035             * java.lang.String)
036             */
037            public void checkServerTrusted(X509Certificate[] arg0, String arg1) throws CertificateException {
038    
039            }
040    }