You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2012/07/03 13:27:29 UTC

svn commit: r1356671 - /httpcomponents/httpclient/trunk/src/docbkx/connmgmt.xml

Author: olegk
Date: Tue Jul  3 11:27:28 2012
New Revision: 1356671

URL: http://svn.apache.org/viewvc?rev=1356671&view=rev
Log:
HTTPCLIENT-1211: corrected code snippets in the connection management section of the tutorial

Modified:
    httpcomponents/httpclient/trunk/src/docbkx/connmgmt.xml

Modified: httpcomponents/httpclient/trunk/src/docbkx/connmgmt.xml
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/src/docbkx/connmgmt.xml?rev=1356671&r1=1356670&r2=1356671&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/src/docbkx/connmgmt.xml (original)
+++ httpcomponents/httpclient/trunk/src/docbkx/connmgmt.xml Tue Jul  3 11:27:28 2012
@@ -339,8 +339,10 @@ sf.connectSocket(socket, address, null, 
                 implementation. One can specify a different hostname verifier implementation if
                 desired</para>
             <programlisting><![CDATA[
+SSLContext sslcontext = SSLContext.getInstance("TLS");
+sslcontext.init(null, null, null);
 SSLSocketFactory sf = new SSLSocketFactory(
-    SSLContext.getInstance("TLS"),
+    sslcontext,
     SSLSocketFactory.STRICT_HOSTNAME_VERIFIER);
 ]]></programlisting>
         </section>
@@ -356,8 +358,10 @@ SSLSocketFactory sf = new SSLSocketFacto
         <programlisting><![CDATA[
 Scheme http = new Scheme("http", 80, PlainSocketFactory.getSocketFactory());
 
+SSLContext sslcontext = SSLContext.getInstance("TLS");
+sslcontext.init(null, null, null);
 SSLSocketFactory sf = new SSLSocketFactory(
-        SSLContext.getInstance("TLS"),
+        sslcontext,
         SSLSocketFactory.STRICT_HOSTNAME_VERIFIER);
 Scheme https = new Scheme("https", 443, sf);