diff --git a/src/libopensc/opensc.h b/src/libopensc/opensc.h index ed721249..bff2017a 100644 --- a/src/libopensc/opensc.h +++ b/src/libopensc/opensc.h @@ -103,6 +103,7 @@ extern "C" { #define SC_AC_OP_INVALIDATE 5 #define SC_AC_OP_LIST_FILES 6 #define SC_AC_OP_CRYPTO 7 +#define SC_AC_OP_DELETE_SELF 8 /* If you add more OPs here, make sure you increase * SC_MAX_AC_OPS in types.h */ @@ -1027,7 +1028,7 @@ int sc_file_set_type_attr(sc_file_t *file, const u8 *type_attr, * @param count number of bytes * @return SC_SUCCESS on success and an error code otherwise */ -int sc_path_set(sc_path_t *path, int type, unsigned char *id, size_t id_len, +int sc_path_set(sc_path_t *path, int type, const u8 *id, size_t id_len, int index, int count); void sc_format_path(const char *path_in, sc_path_t *path_out); diff --git a/src/libopensc/sc.c b/src/libopensc/sc.c index b0e2a2b2..7885fcb5 100644 --- a/src/libopensc/sc.c +++ b/src/libopensc/sc.c @@ -232,7 +232,7 @@ int sc_wait_for_event(sc_reader_t *readers[], int slot_id[], size_t nslots, SC_FUNC_RETURN(ctx, 1, r); } -int sc_path_set(sc_path_t *path, int type, unsigned char *id, size_t id_len, +int sc_path_set(sc_path_t *path, int type, const u8 *id, size_t id_len, int idx, int count) { if (path == NULL || id == NULL || id_len == 0 || id_len > SC_MAX_PATH_SIZE) diff --git a/src/libopensc/types.h b/src/libopensc/types.h index 44527d54..eba18d8b 100644 --- a/src/libopensc/types.h +++ b/src/libopensc/types.h @@ -65,7 +65,7 @@ typedef struct sc_acl_entry { struct sc_acl_entry *next; } sc_acl_entry_t; -#define SC_MAX_AC_OPS 8 +#define SC_MAX_AC_OPS 9 typedef struct sc_file { struct sc_path path; diff --git a/src/pkcs15init/profile.c b/src/pkcs15init/profile.c index 913808c4..b5ec8faa 100644 --- a/src/pkcs15init/profile.c +++ b/src/pkcs15init/profile.c @@ -95,6 +95,7 @@ static struct map fileOpNames[] = { { "SELECT", SC_AC_OP_SELECT }, { "LOCK", SC_AC_OP_LOCK }, { "DELETE", SC_AC_OP_DELETE }, + { "DELETE_SELF",SC_AC_OP_DELETE_SELF }, { "CREATE", SC_AC_OP_CREATE }, { "REHABILITATE",SC_AC_OP_REHABILITATE }, { "INVALIDATE", SC_AC_OP_INVALIDATE }, diff --git a/src/tools/opensc-explorer.c b/src/tools/opensc-explorer.c index b4ead2b8..6b46b05f 100644 --- a/src/tools/opensc-explorer.c +++ b/src/tools/opensc-explorer.c @@ -441,7 +441,7 @@ static int do_info(int argc, char **argv) if (file->type == SC_FILE_TYPE_DF) { const char *ops[] = { "SELECT", "LOCK", "DELETE", "CREATE", "REHABILITATE", - "INVALIDATE", "LIST FILES" + "INVALIDATE", "LIST FILES", "CRYPTO", "DELETE SELF" }; if (file->namelen) { printf("%-15s", "DF name:");