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_callback.hpp 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. //
  2. // ssl/detail/verify_callback.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_DETAIL_VERIFY_CALLBACK_HPP
  11. #define ASIO_SSL_DETAIL_VERIFY_CALLBACK_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/ssl/verify_context.hpp"
  17. #include "asio/detail/push_options.hpp"
  18. namespace asio {
  19. namespace ssl {
  20. namespace detail {
  21. class verify_callback_base
  22. {
  23. public:
  24. virtual ~verify_callback_base()
  25. {
  26. }
  27. virtual bool call(bool preverified, verify_context& ctx) = 0;
  28. };
  29. template <typename VerifyCallback>
  30. class verify_callback : public verify_callback_base
  31. {
  32. public:
  33. explicit verify_callback(VerifyCallback callback)
  34. : callback_(callback)
  35. {
  36. }
  37. virtual bool call(bool preverified, verify_context& ctx)
  38. {
  39. return callback_(preverified, ctx);
  40. }
  41. private:
  42. VerifyCallback callback_;
  43. };
  44. } // namespace detail
  45. } // namespace ssl
  46. } // namespace asio
  47. #include "asio/detail/pop_options.hpp"
  48. #endif // ASIO_SSL_DETAIL_VERIFY_CALLBACK_HPP