Skip to content

Commit

Permalink
CFHTTP using TLS v1.3 (allows TLS 1.2 fallback) LDEV-3239 (#1281)
Browse files Browse the repository at this point in the history
* CFHTTP using TLS v1.3 (allows TLS 1.2 fallback)
* add report of cfhttp TLS version to tests
this is an external dependency, probably will disable by default
* add note test that cfhttp TLS version is jvm dependent
  • Loading branch information
zspitzer authored Apr 14, 2021
1 parent 9b99fbc commit fb0a129
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/src/main/java/lucee/runtime/tag/Http.java
Original file line number Diff line number Diff line change
Expand Up @@ -1431,7 +1431,7 @@ private void ssl(HttpClientBuilder builder) throws PageException {
final SSLConnectionSocketFactory sslsf;
try {
// SSLContext sslcontext = SSLContexts.createSystemDefault();
SSLContext sslcontext = SSLContext.getInstance("TLSv1.2");
SSLContext sslcontext = SSLContext.getInstance("TLS");
if (!StringUtil.isEmpty(this.clientCert)) {
if (this.clientCertPassword == null) this.clientCertPassword = "";
File ksFile = new File(this.clientCert);
Expand Down
9 changes: 7 additions & 2 deletions test/tags/Http.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ component extends="org.lucee.cfml.test.LuceeTestCase" {
assertEquals(data,res.httpRequestData.content);
}



public void function testCheckTLSVersion(){
http url="https://www.howsmyssl.com/a/check" result="local.res";
expect(isJson(res.filecontent)).toBeTrue();
var tlsReport = DeserializeJson(res.filecontent);
SystemOutput("", true);
SystemOutput("CFHTTP is using [#tlsReport.tls_version#] (jvm default)", true);
}
}

0 comments on commit fb0a129

Please sign in to comment.