]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man3/OPENSSL_CTX.pod
Expand the XTS documentation
[thirdparty/openssl.git] / doc / man3 / OPENSSL_CTX.pod
CommitLineData
d64b6299
RL
1=pod
2
3=head1 NAME
4
22e27978
SL
5OPENSSL_CTX, OPENSSL_CTX_new, OPENSSL_CTX_free, OPENSSL_CTX_load_config
6- OpenSSL library context
d64b6299
RL
7
8=head1 SYNOPSIS
9
10 #include <openssl/crypto.h>
11
12 typedef struct openssl_ctx_st OPENSSL_CTX;
13
14 OPENSSL_CTX *OPENSSL_CTX_new(void);
22e27978 15 int OPENSSL_CTX_load_config(OPENSSL_CTX *ctx, const char *config_file);
d64b6299
RL
16 void OPENSSL_CTX_free(OPENSSL_CTX *ctx);
17
18=head1 DESCRIPTION
19
20C<OPENSSL_CTX> is an internal OpenSSL library context type.
21Applications may allocate their own, but may also use C<NULL> to use
22the internal default context with functions that take a C<OPENSSL_CTX>
23argument.
24
25OPENSSL_CTX_new() creates a new OpenSSL library context.
ff6da65e
MC
26When a non default library context is in use care should be taken with
27multi-threaded applications to properly clean up thread local resources before
28the OPENSSL_CTX is freed.
29See L<OPENSSL_thread_stop_ex(3)> for more information.
d64b6299 30
22e27978
SL
31OPENSSL_CTX_load_config() loads a configuration file using the given C<ctx>.
32This can be used to associate a libctx with providers that are loaded from
33a configuration.
34
d64b6299
RL
35OPENSSL_CTX_free() frees the given C<ctx>.
36
37=head1 RETURN VALUES
38
39OPENSSL_CTX_new() return a library context pointer on success, or
40C<NULL> on error.
41
42OPENSSL_CTX_free() doesn't return any value.
43
44=head1 HISTORY
45
22e27978 46OPENSSL_CTX, OPENSSL_CTX_new(), OPENSSL_CTX_load_config() and OPENSSL_CTX_free()
4674aaf4 47were added in OpenSSL 3.0.
d64b6299
RL
48
49=head1 COPYRIGHT
50
22e27978 51Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
d64b6299
RL
52
53Licensed under the Apache License 2.0 (the "License"). You may not use
54this file except in compliance with the License. You can obtain a copy
55in the file LICENSE in the source distribution or at
56L<https://www.openssl.org/source/license.html>.
57
58=cut