mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 02:55:50 +00:00
Add is_short_read()
This commit is contained in:
@@ -3292,8 +3292,6 @@
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\sslutil\api\ECDSACanonical.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\sslutil\api\HashUtilities.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\sslutil\impl\CBigNum.cpp">
|
||||
<ExcludedFromBuild>True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
@@ -3303,9 +3301,6 @@
|
||||
<ClCompile Include="..\..\src\ripple\sslutil\impl\ECDSACanonical.cpp">
|
||||
<ExcludedFromBuild>True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\sslutil\impl\HashUtilities.cpp">
|
||||
<ExcludedFromBuild>True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\testoverlay\api\ConfigType.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\testoverlay\api\ConnectionType.h">
|
||||
|
||||
@@ -4560,9 +4560,6 @@
|
||||
<ClInclude Include="..\..\src\ripple\sslutil\api\ECDSACanonical.h">
|
||||
<Filter>ripple\sslutil\api</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\sslutil\api\HashUtilities.h">
|
||||
<Filter>ripple\sslutil\api</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\sslutil\impl\CBigNum.cpp">
|
||||
<Filter>ripple\sslutil\impl</Filter>
|
||||
</ClCompile>
|
||||
@@ -4572,9 +4569,6 @@
|
||||
<ClCompile Include="..\..\src\ripple\sslutil\impl\ECDSACanonical.cpp">
|
||||
<Filter>ripple\sslutil\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\sslutil\impl\HashUtilities.cpp">
|
||||
<Filter>ripple\sslutil\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\testoverlay\api\ConfigType.h">
|
||||
<Filter>ripple\testoverlay\api</Filter>
|
||||
</ClInclude>
|
||||
|
||||
41
src/beast/beast/asio/ssl.h
Normal file
41
src/beast/beast/asio/ssl.h
Normal file
@@ -0,0 +1,41 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_ASIO_SSL_H_INCLUDED
|
||||
#define BEAST_ASIO_SSL_H_INCLUDED
|
||||
|
||||
#include <boost/asio/ssl/error.hpp>
|
||||
#include <boost/system/error_code.hpp>
|
||||
|
||||
namespace beast {
|
||||
namespace asio {
|
||||
|
||||
/** Returns `true` if the error code is a SSL "short read." */
|
||||
inline
|
||||
bool
|
||||
is_short_read (boost::system::error_code const& ec)
|
||||
{
|
||||
return (ec.category() == boost::asio::error::get_ssl_category())
|
||||
&& (ERR_GET_REASON(ec.value()) == SSL_R_SHORT_READ);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user