2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the Apache License 2.0 (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
9 #include "app_libctx.h"
12 static OSSL_LIB_CTX *app_libctx = NULL;
13 static const char *app_propq = NULL;
15 int app_set_propq(const char *arg)
21 const char *app_get0_propq(void)
26 OSSL_LIB_CTX *app_get0_libctx(void)
31 OSSL_LIB_CTX *app_create_libctx(void)
34 * Load the NULL provider into the default library context and create a
35 * library context which will then be used for any OPT_PROV options.
37 if (app_libctx == NULL) {
38 if (!app_provider_load(NULL, "null")) {
39 opt_printf_stderr("Failed to create null provider\n");
42 app_libctx = OSSL_LIB_CTX_new();
44 if (app_libctx == NULL)
45 opt_printf_stderr("Failed to create library context\n");