You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Stepan Mishura (JIRA)" <ji...@apache.org> on 2007/02/12 11:14:05 UTC

[jira] Commented: (HARMONY-3154) [classlib][security] Security.getProviders(filter) methods don't accept empty attribute value

    [ https://issues.apache.org/jira/browse/HARMONY-3154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12472240 ] 

Stepan Mishura commented on HARMONY-3154:
-----------------------------------------

Link to discussion on dev-list:
http://mail-archives.apache.org/mod_mbox/harmony-dev/200702.mbox/%3c6e47b64f0702112155h33033f65s3e4896690e037d92@mail.gmail.com%3e

> [classlib][security] Security.getProviders(filter) methods don't accept empty attribute value
> ---------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3154
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3154
>             Project: Harmony
>          Issue Type: Bug
>          Components: Non-bug differences from RI
>            Reporter: Stepan Mishura
>         Assigned To: Stepan Mishura
>            Priority: Minor
>
> The following test cases pass on RI but fail on Harmony with InvalidParameterException. However Harmony implementation follows the spec.
>         Security.getProviders("MyService.Algorithm KeySize"); // The filter is not in the required format
> or
>         Map<String, String> m = new HashMap<String, String>();
>         m.put("MyService.Algorithm KeySize", ""); // The value for the key is empty string
>         Security.getProviders(m);
> 1) There is a clear statement in the spec. for getProviders(Map<String,String> filter) method that attribute value MUST be non-empty string.
> The spec says:  "... The selection criteria are represented by a map. Each map entry represents a selection criterion. A provider is selected iff it satisfies all selection criteria. The key for any entry in such a map must be in one of the following two formats:
> ...
> <crypto_service>.<algorithm_or_type> <attribute_name> 
> The cryptographic service name must not contain any dots. There must be one or more space charaters between the <algorithm_or_type> and the <attribute_name>. 
> The value associated with the key must be a non-empty string."
> 2) For the second method - the specified format implies that attribute value can not be omitted. 
> It says for getProviders(String filter):
> "... The selection criterion must be specified in one of the following two formats:
> ...
> <crypto_service>.<algorithm_or_type> <attribute_name>:< attribute_value>
> The cryptographic service name must not contain any dots. There must be one or more space charaters between the the <algorithm_or_type> and the <attribute_name>. 
> A provider satisfies this selection criterion iff the provider implements the specified algorithm or type for the specified cryptographic service and its implementation meets the constraint expressed by the specified attribute name/value pair. "

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.