sc_get_public_key()

Retrieve the public key associated with the specified key store data.

Synopsis:

#include <smartcard/sc_smart_card.h>
 
sc_response_code_t sc_get_public_key(sc_context_t *context,                 
                                     const sc_key_store_data_t *key_store_data,                 
                                     unsigned char *public_key,                 
                                     size_t *public_key_length)

Since:

BlackBerry 10.3.1

Arguments:

context

The active smart card context. Must not be NULL.

key_store_data

The instance of the key store data that identifies the key on the card. Must not be NULL.

public_key

The output buffer where the public key data is written. The DER-encoded public key is returned in X.509 format. If NULL, only the public key length is returned.

public_key_length

On input, the length of the public key buffer. On output, the public key length. Must not be NULL.

Library:

libscs (For the qcc command, use the -l scs option to link against this library)

Description:

Returns:

SC_SCARD_S_SUCCESS upon success, an error code otherwise. See sc_response_code_t for defined error codes.

Last modified: 2014-09-30



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus