123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- #ifndef BOOST_ASIO_SSL_CONTEXT_BASE_HPP
- #define BOOST_ASIO_SSL_CONTEXT_BASE_HPP
- #if defined(_MSC_VER) && (_MSC_VER >= 1200)
- # pragma once
- #endif
- #include <boost/asio/detail/push_options.hpp>
- #include <boost/asio/detail/push_options.hpp>
- #include <boost/config.hpp>
- #include <boost/detail/workaround.hpp>
- #include <boost/asio/detail/pop_options.hpp>
- #include <boost/asio/ssl/detail/openssl_types.hpp>
- namespace boost {
- namespace asio {
- namespace ssl {
- class context_base
- {
- public:
-
- enum method
- {
-
- sslv2,
-
- sslv2_client,
-
- sslv2_server,
-
- sslv3,
-
- sslv3_client,
-
- sslv3_server,
-
- tlsv1,
-
- tlsv1_client,
-
- tlsv1_server,
-
- sslv23,
-
- sslv23_client,
-
- sslv23_server
- };
-
- typedef int options;
- #if defined(GENERATING_DOCUMENTATION)
-
- static const int default_workarounds = implementation_defined;
-
- static const int single_dh_use = implementation_defined;
-
- static const int no_sslv2 = implementation_defined;
-
- static const int no_sslv3 = implementation_defined;
-
- static const int no_tlsv1 = implementation_defined;
- #else
- BOOST_STATIC_CONSTANT(int, default_workarounds = SSL_OP_ALL);
- BOOST_STATIC_CONSTANT(int, single_dh_use = SSL_OP_SINGLE_DH_USE);
- BOOST_STATIC_CONSTANT(int, no_sslv2 = SSL_OP_NO_SSLv2);
- BOOST_STATIC_CONSTANT(int, no_sslv3 = SSL_OP_NO_SSLv3);
- BOOST_STATIC_CONSTANT(int, no_tlsv1 = SSL_OP_NO_TLSv1);
- #endif
-
- enum file_format
- {
-
- asn1,
-
- pem
- };
-
- typedef int verify_mode;
- #if defined(GENERATING_DOCUMENTATION)
-
- static const int verify_none = implementation_defined;
-
- static const int verify_peer = implementation_defined;
-
-
- static const int verify_fail_if_no_peer_cert = implementation_defined;
-
-
- static const int verify_client_once = implementation_defined;
- #else
- BOOST_STATIC_CONSTANT(int, verify_none = SSL_VERIFY_NONE);
- BOOST_STATIC_CONSTANT(int, verify_peer = SSL_VERIFY_PEER);
- BOOST_STATIC_CONSTANT(int,
- verify_fail_if_no_peer_cert = SSL_VERIFY_FAIL_IF_NO_PEER_CERT);
- BOOST_STATIC_CONSTANT(int, verify_client_once = SSL_VERIFY_CLIENT_ONCE);
- #endif
-
- enum password_purpose
- {
-
- for_reading,
-
- for_writing
- };
- protected:
-
- ~context_base()
- {
- }
- #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
- private:
-
- char dummy_;
- #endif
- };
- }
- }
- }
- #include <boost/asio/detail/pop_options.hpp>
- #endif
|