ssl_mode.hpp 797 B

12345678910111213141516171819202122232425262728293031
  1. //
  2. // Copyright (c) 2019-2024 Ruben Perez Hidalgo (rubenperez038 at gmail dot com)
  3. //
  4. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. #ifndef BOOST_MYSQL_SSL_MODE_HPP
  8. #define BOOST_MYSQL_SSL_MODE_HPP
  9. namespace boost {
  10. namespace mysql {
  11. /// Determines how to perform SSL negotiation with the server.
  12. enum class ssl_mode
  13. {
  14. /// Never use TLS
  15. disable,
  16. /// Use TLS if the server supports it, fall back to non-encrypted connection if it does not.
  17. enable,
  18. /// Always use TLS; abort the connection if the server does not support it.
  19. /// Ignored by connections with `Stream` types not supporting SSL.
  20. require
  21. };
  22. } // namespace mysql
  23. } // namespace boost
  24. #endif