Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 65639 invoked from network); 27 Jul 2006 06:55:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 Jul 2006 06:55:40 -0000 Received: (qmail 28604 invoked by uid 500); 27 Jul 2006 06:55:40 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 28513 invoked by uid 500); 27 Jul 2006 06:55:38 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 28502 invoked by uid 99); 27 Jul 2006 06:55:38 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Jul 2006 23:55:38 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Jul 2006 23:55:37 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 50F7B7141E3 for ; Thu, 27 Jul 2006 06:53:15 +0000 (GMT) Message-ID: <30663752.1153983195329.JavaMail.jira@brutus> Date: Wed, 26 Jul 2006 23:53:15 -0700 (PDT) From: "Anton Rusanov (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Commented: (HARMONY-962) org.apache.harmony.crypto.utils.AlgNameMapper overrides hardcoded mappings and determines OIDs incorrectly. In-Reply-To: <27511491.1153741993981.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/HARMONY-962?page=comments#action_12423781 ] Anton Rusanov commented on HARMONY-962: --------------------------------------- Mikhail, patch is applied as expected. Thank you. > 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