| 
									
										
										
										
											2019-02-07 00:42:50 +08:00
										 |  |  | =pod | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | =head1 NAME | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-20 18:25:39 +08:00
										 |  |  | OPENSSL_CTX, OPENSSL_CTX_new, OPENSSL_CTX_free, OPENSSL_CTX_load_config | 
					
						
							|  |  |  | - OpenSSL library context | 
					
						
							| 
									
										
										
										
											2019-02-07 00:42:50 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | =head1 SYNOPSIS | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |  #include <openssl/crypto.h> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |  typedef struct openssl_ctx_st OPENSSL_CTX; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |  OPENSSL_CTX *OPENSSL_CTX_new(void); | 
					
						
							| 
									
										
										
										
											2020-03-20 18:25:39 +08:00
										 |  |  |  int OPENSSL_CTX_load_config(OPENSSL_CTX *ctx, const char *config_file); | 
					
						
							| 
									
										
										
										
											2019-02-07 00:42:50 +08:00
										 |  |  |  void OPENSSL_CTX_free(OPENSSL_CTX *ctx); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | =head1 DESCRIPTION | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | C<OPENSSL_CTX> is an internal OpenSSL library context type. | 
					
						
							|  |  |  | Applications may allocate their own, but may also use C<NULL> to use | 
					
						
							|  |  |  | the internal default context with functions that take a C<OPENSSL_CTX> | 
					
						
							|  |  |  | argument. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | OPENSSL_CTX_new() creates a new OpenSSL library context. | 
					
						
							| 
									
										
										
										
											2019-05-29 23:04:17 +08:00
										 |  |  | When a non default library context is in use care should be taken with | 
					
						
							|  |  |  | multi-threaded applications to properly clean up thread local resources before | 
					
						
							|  |  |  | the OPENSSL_CTX is freed. | 
					
						
							|  |  |  | See L<OPENSSL_thread_stop_ex(3)> for more information. | 
					
						
							| 
									
										
										
										
											2019-02-07 00:42:50 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-20 18:25:39 +08:00
										 |  |  | OPENSSL_CTX_load_config() loads a configuration file using the given C<ctx>. | 
					
						
							|  |  |  | This can be used to associate a libctx with providers that are loaded from | 
					
						
							|  |  |  | a configuration. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-07 00:42:50 +08:00
										 |  |  | OPENSSL_CTX_free() frees the given C<ctx>. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | =head1 RETURN VALUES | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | OPENSSL_CTX_new() return a library context pointer on success, or | 
					
						
							|  |  |  | C<NULL> on error. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | OPENSSL_CTX_free() doesn't return any value. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | =head1 HISTORY | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-20 18:25:39 +08:00
										 |  |  | OPENSSL_CTX, OPENSSL_CTX_new(), OPENSSL_CTX_load_config() and OPENSSL_CTX_free() | 
					
						
							| 
									
										
										
										
											2019-07-15 21:03:44 +08:00
										 |  |  | were added in OpenSSL 3.0. | 
					
						
							| 
									
										
										
										
											2019-02-07 00:42:50 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | =head1 COPYRIGHT | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-20 18:25:39 +08:00
										 |  |  | Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved. | 
					
						
							| 
									
										
										
										
											2019-02-07 00:42:50 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 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 | 
					
						
							|  |  |  | L<https://www.openssl.org/source/license.html>. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | =cut |