aboutsummaryrefslogtreecommitdiff
path: root/tools/cert_create/include
diff options
context:
space:
mode:
authordanh-arm <dan.handley@arm.com>2016-01-13 11:42:30 +0000
committerdanh-arm <dan.handley@arm.com>2016-01-13 11:42:30 +0000
commit6cf9b6ac547c21cf045d3089bd9437f0c6aae854 (patch)
tree5e3376495a5db59308c53482e0e31884c375c94b /tools/cert_create/include
parente123b2a37aa8c0be445bd1f0284b3907b91e5b29 (diff)
parent159807e2faa50a2940f09d57dfa6132220508cce (diff)
downloadtrusted-firmware-a-6cf9b6ac547c21cf045d3089bd9437f0c6aae854.tar.gz
Merge pull request #484 from jcastillo-arm/jc/tf-issues/337
cert_create: update help message
Diffstat (limited to 'tools/cert_create/include')
-rw-r--r--tools/cert_create/include/cert.h1
-rw-r--r--tools/cert_create/include/cmd_opt.h9
-rw-r--r--tools/cert_create/include/ext.h1
-rw-r--r--tools/cert_create/include/key.h1
4 files changed, 11 insertions, 1 deletions
diff --git a/tools/cert_create/include/cert.h b/tools/cert_create/include/cert.h
index 8ef9f27310..6b1ae95486 100644
--- a/tools/cert_create/include/cert.h
+++ b/tools/cert_create/include/cert.h
@@ -57,6 +57,7 @@ struct cert_s {
const char *opt; /* Command line option to pass filename */
const char *fn; /* Filename to save the certificate */
const char *cn; /* Subject CN (Company Name) */
+ const char *help_msg; /* Help message */
/* These fields must be defined statically */
int key; /* Key to be signed */
diff --git a/tools/cert_create/include/cmd_opt.h b/tools/cert_create/include/cmd_opt.h
index ca48d7caf3..389aa23363 100644
--- a/tools/cert_create/include/cmd_opt.h
+++ b/tools/cert_create/include/cmd_opt.h
@@ -42,9 +42,16 @@ enum {
CMD_OPT_EXT
};
+/* Structure to define a command line option */
+typedef struct cmd_opt_s {
+ struct option long_opt;
+ const char *help_msg;
+} cmd_opt_t;
+
/* Exported API*/
-int cmd_opt_add(const char *name, int has_arg, int val);
+void cmd_opt_add(const cmd_opt_t *cmd_opt);
const struct option *cmd_opt_get_array(void);
const char *cmd_opt_get_name(int idx);
+const char *cmd_opt_get_help_msg(int idx);
#endif /* CMD_OPT_H_ */
diff --git a/tools/cert_create/include/ext.h b/tools/cert_create/include/ext.h
index 798bd1be2e..82a4bcb96f 100644
--- a/tools/cert_create/include/ext.h
+++ b/tools/cert_create/include/ext.h
@@ -50,6 +50,7 @@ typedef struct ext_s {
const char *oid; /* OID of the extension */
const char *sn; /* Short name */
const char *ln; /* Long description */
+ const char *help_msg; /* Help message */
int asn1_type; /* OpenSSL ASN1 type of the extension data.
* Supported types are:
* - V_ASN1_INTEGER
diff --git a/tools/cert_create/include/key.h b/tools/cert_create/include/key.h
index bd45f13436..f60997f0fb 100644
--- a/tools/cert_create/include/key.h
+++ b/tools/cert_create/include/key.h
@@ -64,6 +64,7 @@ enum {
typedef struct key_s {
int id; /* Key id */
const char *opt; /* Command line option to specify a key */
+ const char *help_msg; /* Help message */
const char *desc; /* Key description (debug purposes) */
char *fn; /* Filename to load/store the key */
EVP_PKEY *key; /* Key container */