harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Loenko (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (HARMONY-962) org.apache.harmony.crypto.utils.AlgNameMapper overrides hardcoded mappings and determines OIDs incorrectly.
Date Mon, 24 Jul 2006 12:14:17 GMT
     [ 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

        

Mime
View raw message