OpenSC/OpenSC — pull request #13 by mjrider (2012-01-08 15:07:00+00:00)
Title: 2 small fixes for storing a private key

Hello,

2 small fixes for 'pkcs15-init --store-private-key ./key.pem --auth-id 01'

passing the x509_usage flag in do_store_public_key otherwise the public key will not have the right flags based on the
without the fix and calling the above command with -u sign,decrypt the usage flags are
Usage : [0x4], sign
with the fix
Usage : [0xD1], encrypt, wrap, verify, verifyRecover

Setting the default usage flag to verify instead of sign for the public key. If i understand the flags and the sc_pkcs15init_map_usage function correctly
before the fix de default usage for the public key is sign, instead of verify