test/jdk/javax/net/ssl/compatibility/JdkInfo incorrect verification of protocol and cipher support

XMLWordPrintable

        The JdkInfo test helper class is verifying whether a protocol or cipher is supported/enabled by looking at a String value:
        '
        ...
            public final String supportedProtocols;
        ...
          public boolean supportsProtocol(Protocol protocol) {
                return supportedProtocols.contains(protocol.name);
            }
        '
        The approach of checking the existence of a substring is problematic. For instance, when supportedProtocols is equal to 'TLSv1.3,TLSv1.2', supportedProtocols.contains("TLSv1") will return true, given that 'TLSv1' is effectively a substring of 'TLSv1.3'

              Assignee:
              Fernando Guallini
              Reporter:
              Fernando Guallini
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: