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

Certificates using MD5 algorithm that are disabled by default are incorrectly allowed in TLSv1.3 when re-enabled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3 P3
    • 25
    • 8, 11, 17, 21, 25
    • security-libs
    • None

      MD5 algorithm is prohibited by TLSv1.3 RFC to be used in certificates:
      -----
      Any endpoint receiving any certificate which it would need to
      validate using any signature algorithm using an MD5 hash MUST abort
      the handshake with a "bad_certificate" alert.
      -----

      The bug manifests itself when older versions of protocol are supported besides TLSv1.3, such as TLSv1.2. When multiple protocol versions are supported, both client and server calculate their respective SSLSessions's "localSupportedSignAlgs" based on supported signature algorithms for all active protocols and don't update it when negotiated protocol is established. Then "localSupportedSignAlgs" list is used to validate certificate's algorithm.

      While we disable "MD5withRSA" in java.security config, MD5 algorithm should not be allowed in TLSv1.3 regardless of optional configuration.

      To reproduce:
      Run "sun/net/www/protocol/https/HttpsURLConnection/Identities.java" unit test. Observe test running on TLSv1.3 protocol while using certificates with "md5WithRSA" Signature Algorithm.

            abarashev Artur Barashev
            abarashev Artur Barashev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: