summaryrefslogtreecommitdiff
path: root/apps/include
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-07-10 20:19:36 +0200
committerRichard Levitte <levitte@openssl.org>2019-07-15 07:00:29 +0200
commit4b62b8ed4989bb6767a38ae813495ba62215c25b (patch)
tree5c320a660acdd2b56f914ff97ebbb9973dae367a /apps/include
parenta161738a708b5e284a4714edc0c976606ea7cb26 (diff)
downloadopenssl-new-4b62b8ed4989bb6767a38ae813495ba62215c25b.tar.gz
Refactor apps/progs.* to be generate with 'make update'
This makes for a cleaner apps/progs.h as well as as cleaner apps/build.info. We also break out the type declarations to apps/include/function.h apps/progs.c and apps/progs.h are NOT regenerated when 'apps' is disabled. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9340)
Diffstat (limited to 'apps/include')
-rw-r--r--apps/include/function.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/apps/include/function.h b/apps/include/function.h
new file mode 100644
index 0000000000..a0314bb181
--- /dev/null
+++ b/apps/include/function.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
+ *
+ * Licensed under the Apache License 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. You can obtain a copy
+ * in the file LICENSE in the source distribution or at
+ * https://www.openssl.org/source/license.html
+ */
+
+#ifndef APPS_FUNCTION_H
+# define APPS_FUNCTION_H
+
+# include <openssl/lhash.h>
+# include "opt.h"
+
+typedef enum FUNC_TYPE {
+ FT_none, FT_general, FT_md, FT_cipher, FT_pkey,
+ FT_md_alg, FT_cipher_alg
+} FUNC_TYPE;
+
+typedef struct function_st {
+ FUNC_TYPE type;
+ const char *name;
+ int (*func)(int argc, char *argv[]);
+ const OPTIONS *help;
+} FUNCTION;
+
+DEFINE_LHASH_OF(FUNCTION);
+#endif