diff --git a/apps/include/app_libctx.h b/apps/include/app_libctx.h new file mode 100644 index 0000000000..61b143b7db --- /dev/null +++ b/apps/include/app_libctx.h @@ -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 diff --git a/apps/include/apps.h b/apps/include/apps.h index 4b5c34f2e2..bc8c6359f3 100644 --- a/apps/include/apps.h +++ b/apps/include/apps.h @@ -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 diff --git a/apps/lib/opt.c b/apps/lib/opt.c index 0f08da2df4..c6a506480a 100644 --- a/apps/lib/opt.c +++ b/apps/lib/opt.c @@ -12,6 +12,7 @@ */ #include "opt.h" #include "fmt.h" +#include "app_libctx.h" #include "internal/nelem.h" #include #if !defined(OPENSSL_SYS_MSDOS)