pkcs11-tool fails to import EC public keys
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
opensc (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
This is maybe related to #1312462.
After setting up either as Software HSM from opencryptoki or libSoftHSM, do the following to reproduce the problem:
> openssl ecparam -name brainpoolP256r1 -out test.pem -genkey
> openssl ec -in test.pem -pubout -out test_pub.pem
> pkcs11-tool --module /usr/lib/
Using slot 0 with a present token (0x3)
error: OpenSSL error during RSA public key parsing
Aborting.
Expected behaviour: the key is imported as elliptic curve key.
Importing the private key works:
> pkcs11-tool --module /usr/lib/
Using slot 0 with a present token (0x3)
Created private key:
Private Key Object; EC
label:
Usage: decrypt, sign, unwrap
warning: PKCS11 function C_GetAttributeV
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: opensc 0.15.0-1ubuntu1
ProcVersionSign
Uname: Linux 4.4.0-47-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Dec 1 09:31:46 2016
InstallationDate: Installed on 2016-07-07 (146 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
SourcePackage: opensc
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in opensc (Ubuntu): | |
status: | New → Incomplete |
Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue that you reported is one that should be reproducible with the live environment of the Desktop ISO of the development release. It would help us greatly if you could test with it so we can work on getting it fixed in the next release of Ubuntu. You can find out more about the development release at http:// www.ubuntu. com/testing/. Thanks again and we appreciate your help.