RFR: 6447816: Provider filtering (getProviders) is not working with OR'd conditions [v5]

Weijun Wang weijun at openjdk.org
Tue Sep 6 14:33:07 UTC 2022


On Mon, 29 Aug 2022 20:13:42 GMT, Valerie Peng <valeriep at openjdk.org> wrote:

>> Existing provider filtering code only handles two standard attribute "KeySize" and "ImplementedIn", the rest are compared by exact match. Over time, more standard attributes are added which contain multiple values separated by "|". We should enhance the provider filtering code to better compare these.
>> 
>> Documentation update for this is tracked separately under https://bugs.openjdk.org/browse/JDK-6447817.
>> 
>> Thanks in advance for review~
>
> Valerie Peng has updated the pull request incrementally with one additional commit since the last revision:
> 
>   more refactoring.

src/java.base/share/classes/java/security/Security.java line 895:

> 893:                 if (standardName != null) {
> 894:                     key = serviceName + "." + standardName +
> 895:                             (attrName != null ? ' ' + attrName : "");

I'd rather use `(' ' + attrName)`. Always not sure about operation precedence when `?:` is used.

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

PR: https://git.openjdk.org/jdk/pull/10008


More information about the security-dev mailing list