Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4513263

TLS handshake fails when default character encoding is not ASCII compatible

XMLWordPrintable

    • hopper
    • generic
    • generic



      Name: gm110360 Date: 10/10/2001


      java version "1.2.2"
      Solaris VM (build Solaris_JDK_1.2.2_05a, native threads, sunwjit)


      Problem on machines with non-ISO default text encoding. I have a multi-platform
      project which involves IBM OS/390, Sun's and Windows Systems. I use JSSE for the
      communication, works fine except for OS/390 where the default encoding is not
      ISO.

      If both partners run on OS/390 the SSL connection works fine, I suppose as the
      same encoding is used the error neutralizes itself. However if one partner uses
      ISO encoding (Sun or Windows) and the other uses another default encoding (IBM),
      the SSL connection gets an error "javax.net.ssl.SSLException: bad handshake
      record MAC".

      I suppose somewhere in the SSL handshake protocol, text is converted from bytes
      to unicode and vice versa using the default encoding. This produces the
      mentioned error when the default encodings on the systems are different.

      I think the encoding of certificates is fix and is ISO-8859-1, JSSE should use
      the encoding name "8859_1" when converting text and not the default platform
      encoding.
      (Review ID: 133463)
      ======================================================================

            andreas Andreas Sterbenz
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: