Skip to content

Commit 213a90e

Browse files
committed
- By default, all SSL certificates are now validated. To bypass validation, simply call Request.validateSSLCertificates(false) before executing the HTTP Request.
git-svn-id: svn://192.168.0.80/JavaXT/javaxt-core@918 2c7b0aa6-e0b2-3c4e-bb4a-8b65b6c465ff
1 parent 096f893 commit 213a90e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/javaxt/http/Request.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public boolean verify(String hostname, SSLSession session) {
7575
}
7676
};
7777

78-
private boolean validateCertificates = false;
78+
private boolean validateCertificates = true;
7979

8080

8181
public Request clone(){
@@ -238,7 +238,11 @@ public void setUseCache(boolean useCache){
238238
//** validateSSLCertificates
239239
//**************************************************************************
240240
/** Used to enable/disable certificate validation for HTTPS Connections.
241-
* Note that this is set to false by default.
241+
* By default, certificates are validated via a Certificate Authority (CA).
242+
* However, there are times where you may not want to validate a site's
243+
* certificate (e.g. connecting to a intranet site or a development server
244+
* with self-signed certificate). In these cases, you can bypass the
245+
* validation process by setting this method to false.
242246
*/
243247
public void validateSSLCertificates(boolean validateCertificates){
244248
this.validateCertificates = validateCertificates;

0 commit comments

Comments
 (0)