Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-751

ProtocolSocketFactory to upgrade an unsecured connection to secured via TLS

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 5.4-alpha2
    • None
    • None
    • Coded for Java 1.4.2, but interested parties should be able to make it work for less than that.

    Description

      HTTP allows a client to upgrade its connection from an unsecured one to a secured one via the Upgrade header. This protocol component implements a mandatory upgrade. From RFC2817, section 3.2:

      >> OPTIONS * HTTP/1.1
      >> Host: example.bank.com
      >> Upgrade: TLS/1.0
      >> Connection: Upgrade
      >>

      << HTTP/1.1 101 Switching Protocols
      << Upgrade: TLS/1.0, HTTP/1.1
      << Connection: Upgrade
      <<

      – send and complete the TLS handshake
      – server answers the original OPTIONS request

      << HTTP/1.1 200 OK
      << Date: Sun, 17 Feb 2008 17:23:35 GMT
      << Server: Apache
      << Content-Length: 0
      << Content-Type: text/plain
      <<

      My reason for developing this protocol socket factory was to support secure IPP over the standard IPP port.

      Attachments

        1. TLSProtocolSocketFactory.java
          12 kB
          Stephen O'Neil Butler

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sbutler Stephen O'Neil Butler
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h