Import a new key to the smart card.
virtual sc_response_code_t smartcard_spi::SmartCardCryptoProvider::importKey(const unsigned char *certificate, unsigned int certificateLength, const unsigned char *privateKey, unsigned int privateKeyLength, sc_key_store_data_t *keyStoreData)
The certificate to import. The certificate should be DER-encoded in X.509 format. Must not be NULL.
The certificate length.
The private key to import. The private key should be DER-encoded in PKCS8 format and provided in plain text (PKCS8 should not be encrypted). Must not be NULL.
The length of the private key.
The instance of the key store data that identifies the key on the card. On input, if an existing key store data element is provided, the existing key referenced by this instance is replaced with a new key created from the provided data. If a newly created key store data instance is provided, a new key is created. On output, this parameter indicates the instance of the key store data that identifies the newly created key. Must not be NULL.
Library:libscs (For the qcc command, use the -l scs option to link against this library)
If the method succeeds, SC_SCARD_S_SUCCESS is returned. If the method fails, an error code is returned.
Last modified: 2014-09-30