Commit a7a923cb authored by jan.koester's avatar jan.koester
Browse files

test

parent 3359bc13
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -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;
                    }
                }
@@ -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());

@@ -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++;
    }
+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"