RFR: 8282316: Operation before String case conversion

Valerie Peng valeriep at openjdk.java.net
Wed Feb 23 22:46:24 UTC 2022


On Wed, 23 Feb 2022 19:25:10 GMT, Xue-Lei Andrew Fan <xuelei at openjdk.org> wrote:

> In the SignatureUtil implementation, the checkName() requires case-insensitive input for "OID".  However, the method is called before the case conversion, for example: 
> 
>             sigName = checkName(sigName).toUpperCase(Locale.ENGLISH); 
> 
> This update also clean up redundant calls to the checkName() method.

Looks good. Thanks~

src/java.base/share/classes/sun/security/util/SignatureUtil.java line 54:

> 52:      *
> 53:      * @param algName input, could be in any form
> 54:      * @return the matching stdName, or {@code algName} if it is not in the

nit: simplify this return description and emphasize upper case here also? E.g. the matching stdName or the OID string in upper case.

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

Marked as reviewed by valeriep (Reviewer).

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



More information about the security-dev mailing list