OpenSC/OpenSC — pull request #127 by hiviah (2013-01-31 11:38:08+00:00)
Title: Fix to allow exponents other than 65537 for Feitian ePass 2003

This fix will allow importing RSA keys with public exponents other than 65537.

It was tested on actual Feitian ePass 2003. RSA keys with exponents 3 or 0x23 (generated by older OpenSSH) now can be imported and work. Tests pass and those keys are also usable for logging via ssh after exporting with `pkcs15-tool --read-ssh-key`.

Testcase:

openssl genrsa -3 -out privtest.pem 2048
pkcs15-init --reader 0 --auth-id 01 --key-usage sign --format PEM --store-private-key privtest.pem
# test
pkcs11-tool --login --test --module /usr/lib64/opensc-pkcs11.so