From d6b3e5565aa173c8a047b567acd0a717f4fa5cd5 Mon Sep 17 00:00:00 2001 From: Adam Hurwitz Date: Fri, 28 Mar 2014 13:47:38 -0400 Subject: [PATCH] doc changes for ignoreSSLIssues --- src/site/apt/doc/ssl.apt | 15 ++++++++++++++- src/site/examples.txt | 7 +++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/site/apt/doc/ssl.apt b/src/site/apt/doc/ssl.apt index 3583415..ba1dae3 100644 --- a/src/site/apt/doc/ssl.apt +++ b/src/site/apt/doc/ssl.apt @@ -7,7 +7,7 @@ SSL Configuration SSL should, for the most part, "just work." There are a few situations where - it is not completely intuitive. You can follow the example below, or see HttpClient's + it is not completely intuitive. You can follow the examples below, or see HttpClient's {{{http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/conn/ssl/SSLSocketFactory.html}SSLSocketFactory documentation}} for more information. @@ -62,3 +62,16 @@ Certificate was added to keystore %{code-snippet|id=ssl1|brush=groovy|file=src/site/examples.txt} + + +* ignoreSSLIssues + + Alternatively there is a convenience method to ignore SSL issues that arise from + untrusted certificates as well as hostname mismatches. This method is ideally suited + for dev and test situations where strict SSL usage is too time-consuming to configure. + +%{code-snippet|id=ssl2|brush=groovy|file=src/site/examples.txt} + + + + \ No newline at end of file diff --git a/src/site/examples.txt b/src/site/examples.txt index 29321db..30cab74 100644 --- a/src/site/examples.txt +++ b/src/site/examples.txt @@ -474,6 +474,12 @@ def status = http.request( HEAD ) { } END SNIPPET: ssl1 +START SNIPPET: ssl2 +http = new HTTPBuilder("some default path") +http.ignoreSSLIssues() + +END SNIPPET: ssl2 + START SNIPPET: contenttype1 import au.com.bytecode.opencsv.CSVReader import groovyx.net.http.ParserRegistry @@ -664,3 +670,4 @@ START SNIPPET: download4 END SNIPPET: download4 +