Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1533667

Summary: Add: standard algorithm names for all ECC signature types
Product: Red Hat Enterprise Linux 7 Reporter: Matthew Harmsen <mharmsen>
Component: jssAssignee: Christina Fu <cfu>
Status: CLOSED ERRATA QA Contact: ipa-qe <ipa-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5CC: aakkiang, cfu, edewata, elio.maldonado.batiz, extras-qa, kwright, lmiksik, mharmsen, nkinder, rcritten, rmeggins, ssidhaye
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: jss-4.4.0-11.el7 Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: 1533666 Environment:
Last Closed: 2018-04-10 17:56:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1533666    
Bug Blocks:    

Description Matthew Harmsen 2018-01-11 22:37:59 UTC
+++ This bug was initially created as a clone of Bug #1533666 +++

In https://bugzilla.mozilla.org/show_bug.cgi?id=589158, David Stutzman Created attachment 467756 [details] - "correct patch showing + for lines instead of -"

JSS uses SHAxwithEC as their naming for EC Signature algorithms but Sun's "Standard Algorithm Names" are SHAxwithECDSA.  I was using Sun's CertPath API to attempt to chain some EC certificates that had SHA384withECDSA signatures and the building of the CertPath threw an exception because it couldn't find a provider that supported SHA384withECDSA.  The attached patch just adds the 4 aliases for the standard Sun algorithm names to the JSS provider.

Adding these aliases should enable JSS's ECC functionality to be used in more places throughout the entire Java library as it would now support the algorithm names that the library uses.

--- Additional comment from Matthew Harmsen on 2018-01-11 17:33:23 EST ---

Wan-Teh Chang approved this patch:

r=wtc.

It would be nice if we could make SHA1withECDSA
the algorithm name and make SHA1withEC an alias.
Would that break any code?

--- Additional comment from Matthew Harmsen on 2018-01-11 17:34:02 EST ---

David Stutzman replied:

As far as I could tell, the way you guys are creating the provider now, it's reporting the main names of SHAxwithEC.  After I added the new aliases I queried the Provider for it's Provider.Services and called getAlgorithm() and it doesn't explicity list the new ones (or any aliases).  It seems to only show the initial algorithm name.  I don't know if there's a way to get all the aliases for a particular Provider.Service. http://download.oracle.com/javase/6/docs/api/java/security/Provider.Service.html says: "Optionally, it also includes a list of alternate algorithm names for this service (aliases) and attributes, which are a map of (name, value) String pairs," but there doesn't appear to be any getter for that info.

http://download.oracle.com/javase/6/docs/technotes/guides/security/crypto/HowToImplAProvider.html#Aliases  Not a whole lot of helpful info here, but that's the official word on aliases.

On the topic of breaking existing code by changing defaults:

Looking at it with this patch applied if you call  Signature.getInstance("SHA256withEC"), it will work.  If you call Signature.getInstance("SHA256withECDSA"), it will work.

If you change the other name to be the default, again either call above will work.  

The only thing I can see breaking is if someone queries the Provider programatically using Provider.getServices() and then accessing the Provider.Service objects to get names and is expecting to match on the old string (SHAxwithEC) at that point because that won't list aliases.

Most likely it wouldn't be a huge deal because I suspect that not many people are using JSS/NSS for ECC at this time, but that's your call.

Comment 3 Christina Fu 2018-01-12 02:16:59 UTC
pushed:

https://bugzilla.mozilla.org/show_bug.cgi?id=589158#c6

Comment 5 Sumedh Sidhaye 2018-01-31 17:10:59 UTC
Hi Christina,

Do I need to perform any tests other than ensuring ECC stuff is working for this bug, if yes could you please mention it here?

Comment 6 Christina Fu 2018-02-01 19:35:33 UTC
just make sure it doesn't break ECC should be good enough.

Comment 7 Sumedh Sidhaye 2018-02-02 11:32:41 UTC
Build used for verification:

root@csqa4-guest01 ~ # rpm -qi jss
Name        : jss
Version     : 4.4.0
Release     : 11.el7
Architecture: x86_64
Install Date: Monday 29 January 2018 10:37:07 PM EST
Group       : System Environment/Libraries
Size        : 1029926
License     : MPLv1.1 or GPLv2+ or LGPLv2+
Signature   : RSA/SHA256, Monday 22 January 2018 07:02:01 PM EST, Key ID 199e2f91fd431d51
Source RPM  : jss-4.4.0-11.el7.src.rpm
Build Date  : Monday 22 January 2018 06:17:27 PM EST
Build Host  : x86-040.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor      : Red Hat, Inc.
URL         : http://www.mozilla.org/projects/security/pki/jss/
Summary     : Java Security Services (JSS)

All the certificate system (ECC) operations are working as expected.

Hence marking this bug verified.

Comment 10 errata-xmlrpc 2018-04-10 17:56:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0958