You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mikhail Loenko (JIRA)" <ji...@apache.org> on 2006/07/24 14:14:17 UTC

[jira] Assigned: (HARMONY-962) org.apache.harmony.crypto.utils.AlgNameMapper overrides hardcoded mappings and determines OIDs incorrectly.

     [ http://issues.apache.org/jira/browse/HARMONY-962?page=all ]

Mikhail Loenko reassigned HARMONY-962:
--------------------------------------

    Assignee: Mikhail Loenko

> org.apache.harmony.crypto.utils.AlgNameMapper overrides hardcoded mappings and determines OIDs incorrectly.
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-962
>                 URL: http://issues.apache.org/jira/browse/HARMONY-962
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Anton Rusanov
>         Assigned To: Mikhail Loenko
>         Attachments: patch.txt, regression_test_patch.txt
>
>
> org.apache.harmony.crypto.utils.AlgNameMapper in some cases overrides default hardcoded mappings which are not to be overridden (according to description in comments) by the ones from providers. 
> The method isOID(String) of the class determines if the given algorithm name is an OID or not in an incorrect way. 
> import org.apache.harmony.crypto.utils.AlgNameMapper;
> public class AlgNameMapperTest {
>     public static void main(String[] args) {
>         // check a hardcoded mapping
>         String standardName = AlgNameMapper.getStandardName("PBEWITHSHAAND40BITRC2-CBC");
>         if (!standardName.equalsIgnoreCase("pbeWithSHAAnd40BitRC2-CBC")){
>             System.out.println("getStandardName(..) FAILED!");
>         }
>         
>         // check if the algorithm name is an OID
>         if (AlgNameMapper.isOID("not.an.oid")){
>             System.out.println("isOID(..) FAILED!");
>         }
>     } 
> }
> The patch included resolves the problems noted. It also widens the functionality of the mapper to search for signature mappings in providers (currently only Cipher and AlgorithmParameters are searched). 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira