add libctx and property query to fetch functions

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15687)
This commit is contained in:
Pauli 2021-06-10 11:35:26 +10:00
parent 02288cbb65
commit 3334e039cf
3 changed files with 20 additions and 6 deletions

18
apps/include/app_libctx.h Normal file
View File

@ -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

View 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

View 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)