VirtualBox

source: vbox/trunk/src/libs/openssl-3.0.3/include/internal/provider.h@ 96542

最後變更 在這個檔案從96542是 94320,由 vboxsync 提交於 3 年 前

libs/openssl-3.0.1: Export to OSE and fix copyright headers in Makefiles, bugref:10128

檔案大小: 4.7 KB
 
1/*
2 * Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved.
3 *
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
8 */
9
10#ifndef OSSL_INTERNAL_PROVIDER_H
11# define OSSL_INTERNAL_PROVIDER_H
12# pragma once
13
14# include <openssl/core.h>
15# include <openssl/core_dispatch.h>
16# include "internal/dso.h"
17# include "internal/symhacks.h"
18
19# ifdef __cplusplus
20extern "C" {
21# endif
22
23/*
24 * namespaces:
25 *
26 * ossl_provider_ Provider Object internal API
27 * OSSL_PROVIDER Provider Object
28 */
29
30/* Provider Object finder, constructor and destructor */
31OSSL_PROVIDER *ossl_provider_find(OSSL_LIB_CTX *libctx, const char *name,
32 int noconfig);
33OSSL_PROVIDER *ossl_provider_new(OSSL_LIB_CTX *libctx, const char *name,
34 OSSL_provider_init_fn *init_function,
35 int noconfig);
36int ossl_provider_up_ref(OSSL_PROVIDER *prov);
37void ossl_provider_free(OSSL_PROVIDER *prov);
38
39/* Setters */
40int ossl_provider_set_fallback(OSSL_PROVIDER *prov);
41int ossl_provider_set_module_path(OSSL_PROVIDER *prov, const char *module_path);
42int ossl_provider_add_parameter(OSSL_PROVIDER *prov, const char *name,
43 const char *value);
44
45int ossl_provider_is_child(const OSSL_PROVIDER *prov);
46int ossl_provider_set_child(OSSL_PROVIDER *prov, const OSSL_CORE_HANDLE *handle);
47const OSSL_CORE_HANDLE *ossl_provider_get_parent(OSSL_PROVIDER *prov);
48int ossl_provider_up_ref_parent(OSSL_PROVIDER *prov, int activate);
49int ossl_provider_free_parent(OSSL_PROVIDER *prov, int deactivate);
50int ossl_provider_default_props_update(OSSL_LIB_CTX *libctx, const char *props);
51
52/* Disable fallback loading */
53int ossl_provider_disable_fallback_loading(OSSL_LIB_CTX *libctx);
54
55/*
56 * Activate the Provider
57 * If the Provider is a module, the module will be loaded
58 */
59int ossl_provider_activate(OSSL_PROVIDER *prov, int upcalls, int aschild);
60int ossl_provider_deactivate(OSSL_PROVIDER *prov, int removechildren);
61int ossl_provider_add_to_store(OSSL_PROVIDER *prov, OSSL_PROVIDER **actualprov,
62 int retain_fallbacks);
63
64/* Return pointer to the provider's context */
65void *ossl_provider_ctx(const OSSL_PROVIDER *prov);
66
67/* Iterate over all loaded providers */
68int ossl_provider_doall_activated(OSSL_LIB_CTX *,
69 int (*cb)(OSSL_PROVIDER *provider,
70 void *cbdata),
71 void *cbdata);
72
73/* Getters for other library functions */
74const char *ossl_provider_name(const OSSL_PROVIDER *prov);
75const DSO *ossl_provider_dso(const OSSL_PROVIDER *prov);
76const char *ossl_provider_module_name(const OSSL_PROVIDER *prov);
77const char *ossl_provider_module_path(const OSSL_PROVIDER *prov);
78void *ossl_provider_prov_ctx(const OSSL_PROVIDER *prov);
79const OSSL_DISPATCH *ossl_provider_get0_dispatch(const OSSL_PROVIDER *prov);
80OSSL_LIB_CTX *ossl_provider_libctx(const OSSL_PROVIDER *prov);
81
82/* Thin wrappers around calls to the provider */
83void ossl_provider_teardown(const OSSL_PROVIDER *prov);
84const OSSL_PARAM *ossl_provider_gettable_params(const OSSL_PROVIDER *prov);
85int ossl_provider_get_params(const OSSL_PROVIDER *prov, OSSL_PARAM params[]);
86int ossl_provider_get_capabilities(const OSSL_PROVIDER *prov,
87 const char *capability,
88 OSSL_CALLBACK *cb,
89 void *arg);
90int ossl_provider_self_test(const OSSL_PROVIDER *prov);
91const OSSL_ALGORITHM *ossl_provider_query_operation(const OSSL_PROVIDER *prov,
92 int operation_id,
93 int *no_cache);
94void ossl_provider_unquery_operation(const OSSL_PROVIDER *prov,
95 int operation_id,
96 const OSSL_ALGORITHM *algs);
97
98/* Cache of bits to see if we already queried an operation */
99int ossl_provider_set_operation_bit(OSSL_PROVIDER *provider, size_t bitnum);
100int ossl_provider_test_operation_bit(OSSL_PROVIDER *provider, size_t bitnum,
101 int *result);
102int ossl_provider_clear_all_operation_bits(OSSL_LIB_CTX *libctx);
103
104/* Configuration */
105void ossl_provider_add_conf_module(void);
106
107/* Child providers */
108int ossl_provider_init_as_child(OSSL_LIB_CTX *ctx,
109 const OSSL_CORE_HANDLE *handle,
110 const OSSL_DISPATCH *in);
111void ossl_provider_deinit_child(OSSL_LIB_CTX *ctx);
112
113# ifdef __cplusplus
114}
115# endif
116
117#endif
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette