Changeset 741
- Timestamp:
- 07/11/06 13:17:15
- Files:
-
- trunk/calendar3/bldfiles/buildwar.xml (modified) (1 diff)
- trunk/calendar3/bldfiles/defjars.properties (modified) (1 diff)
- trunk/calendar3/caldavClientApi/build.xml (modified) (1 diff)
- trunk/calendar3/caldavClientApi/src/org/bedework/caldav/client/api/CaldavClientIo.java (modified) (4 diffs)
- trunk/calendar3/lib/commons/commons-ssl.jar (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/calendar3/bldfiles/buildwar.xml
r723 r741 301 301 <copy todir="${app.dest.lib}" file="${commons-collections.jar}"/> 302 302 <copy todir="${app.dest.lib}" file="${commons-httclient.jar}"/> 303 <copy todir="${app.dest.lib}" file="${commons-ssl.jar}"/> 303 304 304 305 <!-- add the jdbcdriver if defined --> trunk/calendar3/bldfiles/defjars.properties
r724 r741 85 85 commons-logging.jar=${commons.dir}/commons-logging.jar 86 86 87 # commons-ssl.jar Used by httpclient for https 88 commons-ssl.jar=${commons.dir}/commons-ssl.jar 89 87 90 # commons-validator.jar Used for struts. 88 91 commons-validator.jar=${commons.dir}/commons-validator-1.3.0.jar trunk/calendar3/caldavClientApi/build.xml
r415 r741 40 40 41 41 <path id="compile.classpath"> 42 <pathelement location="${commons-ssl.jar}"/> 42 43 <pathelement location="${httpclient.jar}"/> 43 44 <pathelement location="${ical4j.jar}"/> trunk/calendar3/caldavClientApi/src/org/bedework/caldav/client/api/CaldavClientIo.java
r736 r741 65 65 import org.apache.commons.httpclient.HostConfiguration; 66 66 import org.apache.commons.httpclient.HttpMethod; 67 import org.apache.commons.httpclient.contrib.ssl.BaseProtocolSocketFactory; 67 68 import org.apache.commons.httpclient.protocol.Protocol; 68 import org.apache.commons.httpclient.protocol.ProtocolSocketFactory; 69 import org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory; 69 //import org.apache.commons.httpclient.protocol.ProtocolSocketFactory; 70 //import org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory; 71 import org.apache.commons.ssl.TrustMaterial; 70 72 import org.apache.log4j.Logger; 71 73 … … 116 118 117 119 if (secure) { 120 /* 118 121 ProtocolSocketFactory pfact = new SSLProtocolSocketFactory(); 119 122 Protocol pr = new Protocol("https", pfact, port); 120 123 Protocol.registerProtocol( "https", pr); 121 122 config.setHost(host, port, pr); 124 */ 125 BaseProtocolSocketFactory f = new BaseProtocolSocketFactory(); 126 127 warn("Trusting all certificates"); 128 // might as well trust the usual suspects: 129 //f.addTrustMaterial(TrustMaterial.CACERTS); 130 f.addTrustMaterial(TrustMaterial.TRUST_ALL); 131 132 // here's where we start trusting usertrust.com's CA: 133 //f.addTrustMaterial(new TrustMaterial(pemCert)); 134 135 Protocol trustHttps = new Protocol("https", f, 443); 136 Protocol.registerProtocol("https", trustHttps); 137 138 139 config.setHost(host, port, trustHttps); 123 140 } else { 124 141 config.setHost(host, port); … … 131 148 } 132 149 */ 150 if (debug) { 151 debugMsg("uri set to " + config.getHostURL()); 152 } 133 153 134 154 httpManager.getParams().setConnectionTimeout(timeOut); … … 296 316 } 297 317 318 protected void warn(String msg) { 319 getLogger().warn(msg); 320 } 321 298 322 protected void logIt(String msg) { 299 323 getLogger().info(msg);
