List keys returns the DEV key if exists.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -16,9 +16,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "sc_hsm.h"
|
#include "sc_hsm.h"
|
||||||
|
#include "files.h"
|
||||||
|
|
||||||
int cmd_list_keys()
|
int cmd_list_keys()
|
||||||
{
|
{
|
||||||
|
/* First we send DEV private key */
|
||||||
|
/* Both below conditions should be always TRUE */
|
||||||
|
if (search_by_fid(EF_PRKD_DEV, NULL, SPECIFY_EF)) {
|
||||||
|
res_APDU[res_APDU_size++] = EF_PRKD_DEV >> 8;
|
||||||
|
res_APDU[res_APDU_size++] = EF_PRKD_DEV & 0xff;
|
||||||
|
}
|
||||||
|
if (search_by_fid(EF_KEY_DEV, NULL, SPECIFY_EF)) {
|
||||||
|
res_APDU[res_APDU_size++] = EF_KEY_DEV >> 8;
|
||||||
|
res_APDU[res_APDU_size++] = EF_KEY_DEV & 0xff;
|
||||||
|
}
|
||||||
//first CC
|
//first CC
|
||||||
for (int i = 0; i < dynamic_files; i++) {
|
for (int i = 0; i < dynamic_files; i++) {
|
||||||
file_t *f = &dynamic_file[i];
|
file_t *f = &dynamic_file[i];
|
||||||
|
|||||||
Reference in New Issue
Block a user