Mercurial > jhg
comparison src/org/tmatesoft/hg/repo/HgRemoteRepository.java @ 207:1bf0a5af2d5d
Conditional debug printouts
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 28 Apr 2011 03:10:56 +0200 |
parents | 66fd2c73c56f |
children | 6a2481866491 |
comparison
equal
deleted
inserted
replaced
206:63c9fed4369e | 207:1bf0a5af2d5d |
---|---|
75 if ("https".equals(url.getProtocol())) { | 75 if ("https".equals(url.getProtocol())) { |
76 try { | 76 try { |
77 sslContext = SSLContext.getInstance("SSL"); | 77 sslContext = SSLContext.getInstance("SSL"); |
78 class TrustEveryone implements X509TrustManager { | 78 class TrustEveryone implements X509TrustManager { |
79 public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { | 79 public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { |
80 System.out.println("checkClientTrusted " + authType); | 80 if (debug) { |
81 System.out.println("checkClientTrusted:" + authType); | |
82 } | |
81 } | 83 } |
82 public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { | 84 public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { |
83 System.out.println("checkServerTrusted" + authType); | 85 if (debug) { |
86 System.out.println("checkServerTrusted:" + authType); | |
87 } | |
84 } | 88 } |
85 public X509Certificate[] getAcceptedIssuers() { | 89 public X509Certificate[] getAcceptedIssuers() { |
86 return new X509Certificate[0]; | 90 return new X509Certificate[0]; |
87 } | 91 } |
88 }; | 92 }; |