path: root/tools/cert_create/include/key.h
diff options
authorJuan Castillo <juan.castillo@arm.com>2015-07-03 16:23:16 +0100
committerJuan Castillo <juan.castillo@arm.com>2015-10-23 16:54:13 +0100
commitad2c1a9aa7b95b342ba1f82e67781f3ff20c1e18 (patch)
treeb8c2b5b32e8ef837c6cda2570c3fa47edae171e6 /tools/cert_create/include/key.h
parentdfc90e269c07a29648f8ff1cbdb0d9fd8645e7ff (diff)
cert_create: specify command line options in the CoT
This patch introduces a new API that allows to specify command line options in the Chain of Trust description. These command line options may be used to specify parameters related to the CoT (i.e. keys or certificates), instead of keeping a hardcoded list of options in main.c. Change-Id: I282b0b01cb9add557b26bddc238a28253ce05e44
Diffstat (limited to 'tools/cert_create/include/key.h')
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/cert_create/include/key.h b/tools/cert_create/include/key.h
index da9f1195a..6995a0633 100644
--- a/tools/cert_create/include/key.h
+++ b/tools/cert_create/include/key.h
@@ -63,12 +63,15 @@ enum {
typedef struct key_s {
int id; /* Key id */
+ const char *opt; /* Command line option to specify a key */
const char *desc; /* Key description (debug purposes) */
char *fn; /* Filename to load/store the key */
EVP_PKEY *key; /* Key container */
} key_t;
/* Exported API */
+int key_init(void);
+key_t *key_get_by_opt(const char *opt);
int key_create(key_t *key, int type);
int key_load(key_t *key, unsigned int *err_code);
int key_store(key_t *key);