diff options
author | B Stack <bgstack15@gmail.com> | 2020-10-02 14:42:30 -0400 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2020-10-02 14:42:30 -0400 |
commit | 8aaf029ab6046eb8cbe600a548d176c1418bd99a (patch) | |
tree | d8a89392817379e3036c42eedebf33d4fb372dfd /zen/open_ssl.cpp | |
parent | Merge branch '11.1' into 'master' (diff) | |
download | FreeFileSync-8aaf029ab6046eb8cbe600a548d176c1418bd99a.tar.gz FreeFileSync-8aaf029ab6046eb8cbe600a548d176c1418bd99a.tar.bz2 FreeFileSync-8aaf029ab6046eb8cbe600a548d176c1418bd99a.zip |
add upstream 11.2
Diffstat (limited to 'zen/open_ssl.cpp')
-rw-r--r-- | zen/open_ssl.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/zen/open_ssl.cpp b/zen/open_ssl.cpp index 1d0c4bf2..ea77db43 100644 --- a/zen/open_ssl.cpp +++ b/zen/open_ssl.cpp @@ -5,6 +5,7 @@ // ***************************************************************************** #include "open_ssl.h" +#include <bit> //std::endian #include <stdexcept> #include "base64.h" #include "build_info.h" @@ -774,7 +775,7 @@ std::string zen::convertPuttyKeyToPkix(const std::string& keyStream, const std:: auto numToBeString = [](size_t n) -> std::string { - static_assert(usingLittleEndian()&& sizeof(n) >= 4); + static_assert(std::endian::native == std::endian::little&& sizeof(n) >= 4); const char* numStr = reinterpret_cast<const char*>(&n); return { numStr[3], numStr[2], numStr[1], numStr[0] }; //big endian! }; @@ -806,7 +807,7 @@ std::string zen::convertPuttyKeyToPkix(const std::string& keyStream, const std:: if (itEnd - it < makeSigned(sizeof(byteCount))) throw SysError(L"String extraction failed: unexpected end of stream"); - static_assert(usingLittleEndian()); + static_assert(std::endian::native == std::endian::little); char* numStr = reinterpret_cast<char*>(&byteCount); numStr[3] = *it++; // numStr[2] = *it++; //Putty uses big endian! |