Commit 855bac43 authored by jan.koester's avatar jan.koester
Browse files

test

parent 3e8fe8ab
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -304,13 +304,9 @@ 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]);

        // Major must be 0x03 for TLS
        if (hdr[1] != 0x03) {
        if (ver < 0x0301 || ver > 0x0303) {
            netplus::NetException e;
            e[netplus::NetException::Error]
                << "ssl::accept: bad TLS major version: " << hexByte(hdr[1])
                << " (hdr=" << hexByte(hdr[0]) << " " << hexByte(hdr[1]) << " "
                << hexByte(hdr[2]) << " " << hexByte(hdr[3]) << " " << hexByte(hdr[4]) << ")";
            e[netplus::NetException::Error] << "ssl::accept: bad TLS record version 0x" << ver;
            throw e;
        }