add libctx and property query to fetch functions
authorPauli <pauli@openssl.org>
Thu, 10 Jun 2021 01:35:26 +0000 (11:35 +1000)
committerPauli <pauli@openssl.org>
Tue, 15 Jun 2021 08:26:47 +0000 (18:26 +1000)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15687)

apps/include/app_libctx.h [new file with mode: 0644]
apps/include/apps.h
apps/lib/opt.c

diff --git a/apps/include/app_libctx.h b/apps/include/app_libctx.h
new file mode 100644 (file)
index 0000000..61b143b
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+ * Copyright 2021 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 OSSL_APPS_LIBCTX_H
+# define OSSL_APPS_LIBCTX_H
+
+OSSL_LIB_CTX *app_create_libctx(void);
+OSSL_LIB_CTX *app_get0_libctx(void);
+int app_set_propq(const char *arg);
+const char *app_get0_propq(void);
+
+#endif
index 4b5c34f2e2e85ba668bbf87d7ff46c64175a7f99..bc8c6359f32d1d96ffc7a9e66dc213c87fd3b210 100644 (file)
@@ -37,6 +37,7 @@
 # include "fmt.h"
 # include "platform.h"
 # include "engine_loader.h"
+# include "app_libctx.h"
 
 /*
  * quick macro when you need to pass an unsigned char instead of a char.
@@ -330,8 +331,6 @@ typedef struct verify_options_st {
 
 extern VERIFY_CB_ARGS verify_args;
 
-OSSL_LIB_CTX *app_create_libctx(void);
-OSSL_LIB_CTX *app_get0_libctx(void);
 OSSL_PARAM *app_params_new_from_opts(STACK_OF(OPENSSL_STRING) *opts,
                                      const OSSL_PARAM *paramdefs);
 void app_params_free(OSSL_PARAM *params);
@@ -341,8 +340,4 @@ void app_providers_cleanup(void);
 EVP_PKEY *app_keygen(EVP_PKEY_CTX *ctx, const char *alg, int bits, int verbose);
 EVP_PKEY *app_paramgen(EVP_PKEY_CTX *ctx, const char *alg);
 
-OSSL_LIB_CTX *app_get0_libctx(void);
-int app_set_propq(const char *arg);
-const char *app_get0_propq(void);
-
 #endif
index 0f08da2df441bb81fb6d5df38c943488fcb9c7c3..c6a506480aa4e0d7387d879616fb782fd562433e 100644 (file)
@@ -12,6 +12,7 @@
  */
 #include "opt.h"
 #include "fmt.h"
+#include "app_libctx.h"
 #include "internal/nelem.h"
 #include <string.h>
 #if !defined(OPENSSL_SYS_MSDOS)