mirror of
https://github.com/boostorg/beast.git
synced 2025-08-03 14:54:32 +02:00
Fix warning in is_ssl_handshake
This commit is contained in:
@@ -8,6 +8,7 @@ Version 191:
|
|||||||
* Use mp11 in detail::variant
|
* Use mp11 in detail::variant
|
||||||
* Fix buffers_cat uninitialized warning
|
* Fix buffers_cat uninitialized warning
|
||||||
* Fix static_string uninitialized warning
|
* Fix static_string uninitialized warning
|
||||||
|
* Fix warning in is_ssl_handshake
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@@ -67,14 +67,14 @@ is_ssl_handshake(
|
|||||||
boost::asio::is_const_buffer_sequence<ConstBufferSequence>::value,
|
boost::asio::is_const_buffer_sequence<ConstBufferSequence>::value,
|
||||||
"ConstBufferSequence requirements not met");
|
"ConstBufferSequence requirements not met");
|
||||||
|
|
||||||
// We need at least one byte to really do anything
|
|
||||||
if(boost::asio::buffer_size(buffers) < 1)
|
|
||||||
return boost::indeterminate;
|
|
||||||
|
|
||||||
// Extract the first byte, which holds the
|
// Extract the first byte, which holds the
|
||||||
// "message" type for the Handshake protocol.
|
// "message" type for the Handshake protocol.
|
||||||
unsigned char v;
|
unsigned char v;
|
||||||
boost::asio::buffer_copy(boost::asio::buffer(&v, 1), buffers);
|
if(boost::asio::buffer_copy(boost::asio::buffer(&v, 1), buffers) < 1)
|
||||||
|
{
|
||||||
|
// We need at least one byte to really do anything
|
||||||
|
return boost::indeterminate;
|
||||||
|
}
|
||||||
|
|
||||||
// Check that the message type is "SSL Handshake" (rfc2246)
|
// Check that the message type is "SSL Handshake" (rfc2246)
|
||||||
if(v != 0x16)
|
if(v != 0x16)
|
||||||
|
Reference in New Issue
Block a user