harmony-commits mailing list archives

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


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