tools/pkcs15-tool.c:
Dead assignment: Value stored to 'c' is never read
tools/pkcs11-tool.c:
Dead assignment: Value stored to 'n' is never read
Dead assignment: Value stored to 'rv' is never read
libopensc/card-cac.c:
Dead assignemnt: Value stored to 'tl_head_len' is never read
Dead increment: Value stored to 'outp' is never read
common/libpkcs11.c:
Memory leak in case of C_UnloadModule() fails
libopensc/pkcs15-pubkey.c:
Potential memory leaks
pkcs11/mechanism.c:
Potential memory leak
pkcs11/framework-pkcs15.c:
Potential memory leaks
Dereference of null pointer
Dead assignments
tools/sc-hsm-tool.c:
Function call argument is an uninitialized value
Dead assignment: Value stored to 'r' is never read
libopensc/card-openpgp.c:
Dead assignment: ignoring the errors in case of sc_pkcs15_encode_pubkey() failed
libopensc/pkcs15-cac.c:
Dead assignments: ignoring return values
libopensc/pkcs15-coolkey.c:
Dead assignments: ignoring return values
libopensc/card-sc-hsm.c:
Dereference of undefined pointer value: Properly check the file allocation
pkcs11/slot.c:
Dead assignment
pkcs15init/pkcs15-cflex.c:
Dereference of null pointer
Uninitialized argument values
Very brief instructions
To init card:
Erase card and create pkcs15 dir
./pkcs15-init -EC
Store a PIN on the card, using ID 01
./pkcs15-init -P --auth-id 01 --pin aaaa --puk bbbb --label "My PIN"
Generate a 512 bit RSA key and store on card, protected by the above PIN
./pkcs15-init -G rsa/512 --auth-id 01
Or, store a pkcs12 key/certificate pair
./pkcs15-init --auth-id 01 -f pkcs12 -S mycert.p12
Note that the pkcs12 file must use just one password - if you
use different passwords for integrity and confidentiality,
OpenSC will fail to import the keys.