Loading src/ssl.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -1673,7 +1673,10 @@ void netplus::ssl::handshake_after_accept(){ size_t vend = vp + vlen; while (vp + 1 < vend) { uint16_t v = (uint16_t(ch[vp]) << 8) | ch[vp+1]; if (v == 0x0304) return true; // TLS 1.3 if (v == 0x0304) { offeredTLS13 = true; // TLS 1.3 break; } vp += 2; } } Loading Loading @@ -2540,7 +2543,7 @@ void netplus::ssl::accept(LPFN_ACCEPTEX lpfnAcceptEx, std::unique_ptr<socket>& c NetException exception; if (!csock) { csock = std::make_unique<netplus::ssl>(this->_cert); csock = std::make_unique<netplus::ssl>(*this->_cert); } ssl* cssock = static_cast<ssl*>(csock.get()); Loading Loading @@ -2620,7 +2623,7 @@ std::vector<uint8_t> netplus::ssl::_hkdf_expand( T = _hmac_sha256(prk, data); size_t take = std::min(T.size(), L - okm.size()); size_t take = (std::min)(T.size(), L - okm.size()); okm.insert(okm.end(), T.begin(), T.begin() + take); counter++; } Loading test/aes.cpp +1 −1 Original line number Diff line number Diff line #include <iostream> #include <iomanip> #include <vector> #include <iomanip> #include <string> #include <cstring> #include "../src/crypto/aes.h" Loading Loading
src/ssl.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -1673,7 +1673,10 @@ void netplus::ssl::handshake_after_accept(){ size_t vend = vp + vlen; while (vp + 1 < vend) { uint16_t v = (uint16_t(ch[vp]) << 8) | ch[vp+1]; if (v == 0x0304) return true; // TLS 1.3 if (v == 0x0304) { offeredTLS13 = true; // TLS 1.3 break; } vp += 2; } } Loading Loading @@ -2540,7 +2543,7 @@ void netplus::ssl::accept(LPFN_ACCEPTEX lpfnAcceptEx, std::unique_ptr<socket>& c NetException exception; if (!csock) { csock = std::make_unique<netplus::ssl>(this->_cert); csock = std::make_unique<netplus::ssl>(*this->_cert); } ssl* cssock = static_cast<ssl*>(csock.get()); Loading Loading @@ -2620,7 +2623,7 @@ std::vector<uint8_t> netplus::ssl::_hkdf_expand( T = _hmac_sha256(prk, data); size_t take = std::min(T.size(), L - okm.size()); size_t take = (std::min)(T.size(), L - okm.size()); okm.insert(okm.end(), T.begin(), T.begin() + take); counter++; } Loading
test/aes.cpp +1 −1 Original line number Diff line number Diff line #include <iostream> #include <iomanip> #include <vector> #include <iomanip> #include <string> #include <cstring> #include "../src/crypto/aes.h" Loading