diff options
author | B Stack <bgstack15@gmail.com> | 2020-10-03 01:04:14 +0000 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2020-10-03 01:04:14 +0000 |
commit | 0576c1a2ab5ff534348c879ea03bb9c9d9f7ac4c (patch) | |
tree | d8a89392817379e3036c42eedebf33d4fb372dfd /zen/open_ssl.cpp | |
parent | Merge branch '11.1' into 'master' (diff) | |
parent | add upstream 11.2 (diff) | |
download | FreeFileSync-0576c1a2ab5ff534348c879ea03bb9c9d9f7ac4c.tar.gz FreeFileSync-0576c1a2ab5ff534348c879ea03bb9c9d9f7ac4c.tar.bz2 FreeFileSync-0576c1a2ab5ff534348c879ea03bb9c9d9f7ac4c.zip |
Merge branch '11.2' into 'master'11.2
add upstream 11.2
See merge request opensource-tracking/FreeFileSync!26
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! |