]>
git.ipfire.org Git - thirdparty/openssl.git/blob - include/internal/provider.h
2 * Copyright 2019 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
10 #ifndef OSSL_INTERNAL_PROVIDER_H
11 # define OSSL_INTERNAL_PROVIDER_H
13 # include <openssl/core.h>
14 # include "internal/dso.h"
15 # include "internal/symhacks.h"
24 * ossl_provider_ Provider Object internal API
25 * OSSL_PROVIDER Provider Object
28 /* Provider Object finder, constructor and destructor */
29 OSSL_PROVIDER
*ossl_provider_find(OPENSSL_CTX
*libctx
, const char *name
);
30 OSSL_PROVIDER
*ossl_provider_new(OPENSSL_CTX
*libctx
, const char *name
,
31 OSSL_provider_init_fn
*init_function
);
32 int ossl_provider_up_ref(OSSL_PROVIDER
*prov
);
33 void ossl_provider_free(OSSL_PROVIDER
*prov
);
36 int ossl_provider_set_fallback(OSSL_PROVIDER
*prov
);
37 int ossl_provider_set_module_path(OSSL_PROVIDER
*prov
, const char *module_path
);
38 int ossl_provider_add_parameter(OSSL_PROVIDER
*prov
, const char *name
,
42 * Activate the Provider
43 * If the Provider is a module, the module will be loaded
44 * Inactivation is done by freeing the Provider
46 int ossl_provider_activate(OSSL_PROVIDER
*prov
);
48 /* Return pointer to the provider's context */
49 void *ossl_provider_ctx(const OSSL_PROVIDER
*prov
);
51 /* Iterate over all loaded providers */
52 int ossl_provider_forall_loaded(OPENSSL_CTX
*,
53 int (*cb
)(OSSL_PROVIDER
*provider
,
57 /* Getters for other library functions */
58 const char *ossl_provider_name(const OSSL_PROVIDER
*prov
);
59 const DSO
*ossl_provider_dso(const OSSL_PROVIDER
*prov
);
60 const char *ossl_provider_module_name(const OSSL_PROVIDER
*prov
);
61 const char *ossl_provider_module_path(const OSSL_PROVIDER
*prov
);
63 /* Thin wrappers around calls to the provider */
64 void ossl_provider_teardown(const OSSL_PROVIDER
*prov
);
65 const OSSL_PARAM
*ossl_provider_get_param_types(const OSSL_PROVIDER
*prov
);
66 int ossl_provider_get_params(const OSSL_PROVIDER
*prov
, OSSL_PARAM params
[]);
67 const OSSL_ALGORITHM
*ossl_provider_query_operation(const OSSL_PROVIDER
*prov
,
72 void ossl_provider_add_conf_module(void);