Loading src/ssl.cpp +2 −10 Original line number Diff line number Diff line Loading @@ -304,15 +304,6 @@ namespace netplus { const uint16_t ver = (uint16_t(hdr[1]) << 8) | uint16_t(hdr[2]); const uint16_t len = (uint16_t(hdr[3]) << 8) | uint16_t(hdr[4]); if (ver < 0x0301 || ver > 0x0303) { netplus::NetException e; e[netplus::NetException::Error] << "ssl::accept: bad TLS record version 0x" << ver; throw e; } // If you want TLS 1.2 only: // if (ver != 0x0303) { ... } // Or allow TLS 1.0–1.2 record versions: if (ver < 0x0301 || ver > 0x0303) { netplus::NetException e; Loading Loading @@ -1817,6 +1808,7 @@ std::vector<uint8_t> netplus::ssl::_decryptRecordCBC(uint8_t recType, uint16_t ver, const std::vector<uint8_t>& frag) { if (ver != 0x0303) { netplus::NetException e; e[netplus::NetException::Error] << "bad tls version"; throw e; Loading Loading @@ -2213,7 +2205,7 @@ bool netplus::ssl::handshakeStepIOCP() const uint16_t ver = (uint16_t(rec[1]) << 8) | uint16_t(rec[2]); const uint16_t len = (uint16_t(rec[3]) << 8) | uint16_t(rec[4]); if (ver != 0x0303) { if (ver < 0x0301 || ver > 0x0303) { // rec includes the popped TLS record (5+len bytes) const size_t showRec = (std::min<size_t>)(rec.size(), 32); std::cerr << "[TLS-HS] bad ver=" << std::hex << ver << std::dec Loading Loading
src/ssl.cpp +2 −10 Original line number Diff line number Diff line Loading @@ -304,15 +304,6 @@ namespace netplus { const uint16_t ver = (uint16_t(hdr[1]) << 8) | uint16_t(hdr[2]); const uint16_t len = (uint16_t(hdr[3]) << 8) | uint16_t(hdr[4]); if (ver < 0x0301 || ver > 0x0303) { netplus::NetException e; e[netplus::NetException::Error] << "ssl::accept: bad TLS record version 0x" << ver; throw e; } // If you want TLS 1.2 only: // if (ver != 0x0303) { ... } // Or allow TLS 1.0–1.2 record versions: if (ver < 0x0301 || ver > 0x0303) { netplus::NetException e; Loading Loading @@ -1817,6 +1808,7 @@ std::vector<uint8_t> netplus::ssl::_decryptRecordCBC(uint8_t recType, uint16_t ver, const std::vector<uint8_t>& frag) { if (ver != 0x0303) { netplus::NetException e; e[netplus::NetException::Error] << "bad tls version"; throw e; Loading Loading @@ -2213,7 +2205,7 @@ bool netplus::ssl::handshakeStepIOCP() const uint16_t ver = (uint16_t(rec[1]) << 8) | uint16_t(rec[2]); const uint16_t len = (uint16_t(rec[3]) << 8) | uint16_t(rec[4]); if (ver != 0x0303) { if (ver < 0x0301 || ver > 0x0303) { // rec includes the popped TLS record (5+len bytes) const size_t showRec = (std::min<size_t>)(rec.size(), 32); std::cerr << "[TLS-HS] bad ver=" << std::hex << ver << std::dec Loading