Hi!
I've just downloaded "openssl 0.9.7b" and successfully patched it with
"hw_pkcs11-0.9.7b.patch.gz" and compule it under Windows XP using
"Visual C++ 6.0".
I want to use this "pkcs11 engine" to access SmartCards using its
pkcs11 library.

The I successfully created an RSA key pair using:

>openssl genrsa -out priv.key -engine pkcs11 1024
  engine "pkcs11" set.
  Loading 'screen' into random state - done
  Generating RSA private key, 1024 bit long modulus
  e is 65537 (0x10001)
 
output file: priv.key 
-----BEGIN RSA PRIVATE KEY-----
MIGMAgEAAoGBAKEwYwCUHTeQnwa1vcWzBuybikf2I2NOiaUZT6dKB9zYayN1b4Mo
/d1qLm8Hqpoy99srq2ABKQAY+IvLRuDa+OGyzl9xG2ra5qSvMUgUgjPdw1hL/U8v
pTybLTSMvMxsYYv/8XMM7IGFNScckm/CouuXAeTtqMh9dZanTNNByBNVAgMBAAE=
-----END RSA PRIVATE KEY-----


Now the problem is that I could not sign anything using this engine. I
tried:

>openssl rsautl -in c:\1.txt -inkey priv.key -sign -hexdump -engine
pkcs11
  engine "pkcs11" set.
  Loading 'screen' into random state - done
  unable to load Private Key

Note: Same commands used without "engine pkcs11" line work ok.

My question is how to use the generated private RSA key to sign
anything using openssl ?

Best regards
   Stefan

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to