Ticket #11809: asio_ssl_renegotiate.patch
File asio_ssl_renegotiate.patch, 1.7 KB (added by , 7 years ago) |
---|
-
boost/asio/ssl/detail/engine.hpp
146 146 // Adapt the SSL_write function to the signature needed for perform(). 147 147 BOOST_ASIO_DECL int do_write(void* data, std::size_t length); 148 148 149 // Adapt the SSL_do_handshake function to the signature needed for perform(). 150 BOOST_ASIO_DECL int do_handshake(void* data, std::size_t length); 151 149 152 SSL* ssl_; 150 153 BIO* ext_bio_; 151 154 }; -
boost/asio/ssl/detail/impl/engine.ipp
134 134 engine::want engine::handshake( 135 135 stream_base::handshake_type type, boost::system::error_code& ec) 136 136 { 137 return perform((type == boost::asio::ssl::stream_base::client) 138 ? &engine::do_connect : &engine::do_accept, 0, 0, ec, 0); 137 switch (type) 138 { 139 case boost::asio::ssl::stream_base::client: 140 return perform(&engine::do_connect, 0, 0, ec, 0); 141 case boost::asio::ssl::stream_base::server: 142 return perform(&engine::do_accept, 0, 0, ec, 0); 143 case boost::asio::ssl::stream_base::renegotiate: 144 ::SSL_renegotiate(ssl_); 145 return perform(&engine::do_handshake, 0, 0, ec, 0); 146 } 139 147 } 140 148 141 149 engine::want engine::shutdown(boost::system::error_code& ec) … … 316 324 length < INT_MAX ? static_cast<int>(length) : INT_MAX); 317 325 } 318 326 327 int engine::do_handshake(void*, std::size_t) 328 { 329 return ::SSL_do_handshake(ssl_); 330 } 331 319 332 #endif // !defined(BOOST_ASIO_ENABLE_OLD_SSL) 320 333 321 334 } // namespace detail -
boost/asio/ssl/stream_base.hpp
35 35 client, 36 36 37 37 /// Perform handshaking as a server. 38 server 38 server, 39 40 /// Perform renegotiation handshake. 41 renegotiate 39 42 }; 40 43 41 44 protected: