Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

verify_context.hpp 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. //
  2. // ssl/verify_context.hpp
  3. // ~~~~~~~~~~~~~~~~~~~~~~
  4. //
  5. // Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  6. //
  7. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  8. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. #ifndef ASIO_SSL_VERIFY_CONTEXT_HPP
  11. #define ASIO_SSL_VERIFY_CONTEXT_HPP
  12. #if defined(_MSC_VER) && (_MSC_VER >= 1200)
  13. # pragma once
  14. #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
  15. #include "asio/detail/config.hpp"
  16. #include "asio/detail/noncopyable.hpp"
  17. #include "asio/ssl/detail/openssl_types.hpp"
  18. #include "asio/detail/push_options.hpp"
  19. namespace asio {
  20. namespace ssl {
  21. /// A simple wrapper around the X509_STORE_CTX type, used during verification of
  22. /// a peer certificate.
  23. /**
  24. * @note The verify_context does not own the underlying X509_STORE_CTX object.
  25. */
  26. class verify_context
  27. : private noncopyable
  28. {
  29. public:
  30. /// The native handle type of the verification context.
  31. typedef X509_STORE_CTX* native_handle_type;
  32. /// Constructor.
  33. explicit verify_context(native_handle_type handle)
  34. : handle_(handle)
  35. {
  36. }
  37. /// Get the underlying implementation in the native type.
  38. /**
  39. * This function may be used to obtain the underlying implementation of the
  40. * context. This is intended to allow access to context functionality that is
  41. * not otherwise provided.
  42. */
  43. native_handle_type native_handle()
  44. {
  45. return handle_;
  46. }
  47. private:
  48. // The underlying native implementation.
  49. native_handle_type handle_;
  50. };
  51. } // namespace ssl
  52. } // namespace asio
  53. #include "asio/detail/pop_options.hpp"
  54. #endif // ASIO_SSL_VERIFY_CONTEXT_HPP