Storing RSA key on EnterSafe smart card fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
opensc (Debian) |
Fix Released
|
Unknown
|
|||
opensc (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Lucid |
Fix Released
|
Undecided
|
Unassigned | ||
Maverick |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: opensc
Lucid, OpenSC 0.11.12:
firas@tsukino ~ % dpkg -l | grep opensc
ii libopensc2 0.11.12-1ubuntu3 Smart card library with support for PKCS#15
ii opensc 0.11.12-1ubuntu3 Smart card utilities with support for PKCS#1
firas@tsukino ~ % lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid
How to reproduce:
Initialise the smart card:
firas@tsukino ~ % pkcs15-init -E -C --label "My Smart Card"
Using reader with a card: Feitian SCR301 00 00
New User PIN.
Please enter User PIN:
Please type again to verify:
Unblock Code for New User PIN (Optional - press return for no PIN).
Please enter User unblocking PIN (PUK):
Please type again to verify:
Generate RSA key:
firas@tsukino ~ % openssl genrsa -des3 -out mykey.key 1024
Generating RSA private key, 1024 bit long modulus
.......
.......++++++
e is 65537 (0x10001)
Enter pass phrase for mykey.key:
Verifying - Enter pass phrase for mykey.key:
Try to story the key on the card:
firas@tsukino ~ % pkcs15-init -S mykey.key --auth-id ff --label "My Private Key"
Using reader with a card: Feitian SCR301 00 00
Please enter passphrase to unlock secret key:
User PIN required.
Please enter User PIN:
pkcs15-init: card-entersafe.
zsh: abort pkcs15-init -S mykey.key --auth-id ff --label "My Private Key"
A fix exists (patch already comitted in upstream SVN):
http://
http://<email address hidden>
Debdiff to follow applying both patches:
-> First patch fixes storing a key
-> Second patch fixes an unrelated bug that causes a segfault when trying to store a 2048-bit key (1024-bit key works fine with the first patch alone)
Fix is SRU-worthy IMO.
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: opensc 0.11.12-1ubuntu3
ProcVersionSign
Uname: Linux 2.6.32-24-generic x86_64
NonfreeKernelMo
Architecture: amd64
Date: Sun Aug 22 17:55:01 2010
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
ProcEnviron:
LANGUAGE=en
LANG=en_GB.utf8
SHELL=/bin/zsh
SourcePackage: opensc
Changed in opensc (Ubuntu): | |
status: | New → Fix Committed |
Changed in opensc (Debian): | |
status: | Unknown → New |
Changed in opensc (Debian): | |
status: | New → Confirmed |
Changed in opensc (Debian): | |
status: | Confirmed → Fix Released |
BTW, the bug also affects Maverick. I'll try to get it pushed into Debian first.