RFR: 8282309: Operation before upper case conversion

Xue-Lei Andrew Fan xuelei at openjdk.java.net
Wed Feb 23 16:15:19 UTC 2022


In the TlsChannelBinding.java implementation, the string operation is placed before the case conversion. The behavior may be not expected.


        String hashAlg = serverCertificate.getSigAlgName().
-          replace("SHA", "SHA-").toUpperCase(Locale.ENGLISH);
+         toUpperCase(Locale.ENGLISH).replace("SHA", "SHA-");


See also [Bernd Eckenfels](mailto:ecki at zusammenkunft.net) comment in [PR 7583](https://github.com/openjdk/jdk/pull/7583)

-------------

Commit messages:
 - 8282309: Operation before upper case conversion

Changes: https://git.openjdk.java.net/jdk/pull/7592/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7592&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8282309
  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7592.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7592/head:pull/7592

PR: https://git.openjdk.java.net/jdk/pull/7592



More information about the security-dev mailing list