5 OPENSSL_CTX, OPENSSL_CTX_new, OPENSSL_CTX_free, OPENSSL_CTX_load_config
6 - OpenSSL library context
10 #include <openssl/crypto.h>
12 typedef struct openssl_ctx_st OPENSSL_CTX;
14 OPENSSL_CTX *OPENSSL_CTX_new(void);
15 int OPENSSL_CTX_load_config(OPENSSL_CTX *ctx, const char *config_file);
16 void OPENSSL_CTX_free(OPENSSL_CTX *ctx);
20 C<OPENSSL_CTX> is an internal OpenSSL library context type.
21 Applications may allocate their own, but may also use C<NULL> to use
22 the internal default context with functions that take a C<OPENSSL_CTX>
25 OPENSSL_CTX_new() creates a new OpenSSL library context.
26 When a non default library context is in use care should be taken with
27 multi-threaded applications to properly clean up thread local resources before
28 the OPENSSL_CTX is freed.
29 See L<OPENSSL_thread_stop_ex(3)> for more information.
31 OPENSSL_CTX_load_config() loads a configuration file using the given C<ctx>.
32 This can be used to associate a libctx with providers that are loaded from
35 OPENSSL_CTX_free() frees the given C<ctx>.
39 OPENSSL_CTX_new() return a library context pointer on success, or
42 OPENSSL_CTX_free() doesn't return any value.
46 OPENSSL_CTX, OPENSSL_CTX_new(), OPENSSL_CTX_load_config() and OPENSSL_CTX_free()
47 were added in OpenSSL 3.0.
51 Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
53 Licensed under the Apache License 2.0 (the "License"). You may not use
54 this file except in compliance with the License. You can obtain a copy
55 in the file LICENSE in the source distribution or at
56 L<https://www.openssl.org/source/license.html>.