Bug 1465565 - Fix HmacTest code for AES encrypt/unwrap
Summary: Fix HmacTest code for AES encrypt/unwrap
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: jss
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jack Magne
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1465566
TreeView+ depends on / blocked
 
Reported: 2017-06-27 16:11 UTC by Matthew Harmsen
Modified: 2018-11-30 19:30 UTC (History)
6 users (show)

Fixed In Version: jss-4.4.2-5.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1465566 (view as bug list)
Environment:
Last Closed: 2018-11-30 19:30:57 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Mozilla Foundation 1373824 0 None None None 2019-04-16 13:02:08 UTC

Description Matthew Harmsen 2017-06-27 16:11:00 UTC
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.104 Safari/537.36

Steps to reproduce:

HmacTest code shows importing an HMAC-SHA1 key via an AES encrypt and AES unwrap call.  It works prior to change 2163 (or if I revert PK11MessageDigest.c).


Actual results:

After changeset 2163 (particularly change to PK11MessageDigest.c), it fails.
The failure is caused because PK11_CreateContextBySymKey(mech, CKA_SIGN,
newKey, &param) returns null.

[root@VTPFWSMUXG ~]# java -cp $CLASS_PATH:. HmacTest
mac: javax.crypto.Mac@126097b, Mozilla-JSS version 4.4
key: org.mozilla.jss.crypto.SecretKeyFacade@1468bd9
Exception in thread "main" java.security.InvalidKeyException: DigestException: Unable to initialize digest context
	at org.mozilla.jss.provider.javax.crypto.JSSMacSpi.engineInit(JSSMacSpi.java:53)
	at org.mozilla.jss.provider.javax.crypto.JSSMacSpi$HmacSHA1.engineInit(JSSMacSpi.java:93)
	at javax.crypto.Mac.init(Mac.java:413)
	at HmacTest.main(HmacTest.java:37)



Expected results:

Prior to changeset 2163, importing an HMAC-SHA1 key via encryption and then
unwrap worked.

[root@VTPFWSMUXG ~]# java -cp $CLASS_PATH:. HmacTest
mac: javax.crypto.Mac@30f1c0, Mozilla-JSS version 4.4
key: org.mozilla.jss.crypto.SecretKeyFacade@c77c2e
Done

Comment 1 Jan Kurik 2017-08-15 07:10:49 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.

Comment 2 Jack Magne 2017-09-01 23:48:43 UTC
Upstream Checkin:

changeset:   2197:eec15518fd61
tag:         tip
user:        Jack Magne <jmagne>
date:        Fri Sep 01 16:15:54 2017 -0700
files:       org/mozilla/jss/pkcs11/PK11KeyWrapper.java org/mozilla/jss/pkcs11/PK11MessageDigest.c org/mozilla/jss/tests/HmacTest.java org/mozilla/jss/tests/all.pl
description:
unwrapping of HMAC-SHA1 secret keys using AES wrapping and unwrapping
cfu on behalf of jmagne

Comment 3 Ben Cotton 2018-11-27 17:17:23 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Ben Cotton 2018-11-30 19:30:57 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.