OPENSSL_CTX.pod 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. =pod
  2. =head1 NAME
  3. OPENSSL_CTX, OPENSSL_CTX_new, OPENSSL_CTX_free - OpenSSL library context
  4. =head1 SYNOPSIS
  5. #include <openssl/crypto.h>
  6. typedef struct openssl_ctx_st OPENSSL_CTX;
  7. OPENSSL_CTX *OPENSSL_CTX_new(void);
  8. void OPENSSL_CTX_free(OPENSSL_CTX *ctx);
  9. =head1 DESCRIPTION
  10. C<OPENSSL_CTX> is an internal OpenSSL library context type.
  11. Applications may allocate their own, but may also use C<NULL> to use
  12. the internal default context with functions that take a C<OPENSSL_CTX>
  13. argument.
  14. OPENSSL_CTX_new() creates a new OpenSSL library context.
  15. When a non default library context is in use care should be taken with
  16. multi-threaded applications to properly clean up thread local resources before
  17. the OPENSSL_CTX is freed.
  18. See L<OPENSSL_thread_stop_ex(3)> for more information.
  19. OPENSSL_CTX_free() frees the given C<ctx>.
  20. =head1 RETURN VALUES
  21. OPENSSL_CTX_new() return a library context pointer on success, or
  22. C<NULL> on error.
  23. OPENSSL_CTX_free() doesn't return any value.
  24. =head1 HISTORY
  25. OPENSSL_CTX, OPENSSL_CTX_new() and OPENSSL_CTX_free()
  26. were added in OpenSSL 3.0.
  27. =head1 COPYRIGHT
  28. Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
  29. Licensed under the Apache License 2.0 (the "License"). You may not use
  30. this file except in compliance with the License. You can obtain a copy
  31. in the file LICENSE in the source distribution or at
  32. L<https://www.openssl.org/source/license.html>.
  33. =cut