List Info

Thread: Re: Openssl and PIN




Re: Openssl and PIN
user name
2007-01-10 14:58:54
Alle 20:58, mercoledì 10 gennaio 2007, Giulio Ferro ha
scritto:
> 2) In order to sign with openssl from my scripts,I need
a way to send
> the PIN of the smartcard without going interactive. As
you know, all
> commands from openssl ask the user for the PIN, but
this is
> unfeasable in application scripts.
>

write in a text file command.txt, for example, these 2 rows

engine dynamic -pre
SO_PATH:/usr/local/lib/opensc/engine_pkcs11.so -pre 
ID:pkcs11 -pre NO_VCHECK:1 -pre LIST_ADD:1 -pre LOAD -pre 
MODULE_PATH:/usr/local/lib/pkcs11/opensc-pkcs11.so -pre
PIN:00000000

smime -sign -in test.txt -out test.txt.p7m -engine pkcs11
-keyform engine 
-inkey slot_0-id_01 -signer mycert.pem

and then just
openssl < command.txt

-- 
Antonio
http://www.blia.it
_______________________________________________
opensc-user mailing list
opensc-userlists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-
user

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )