Loading src/socket.h +2 −0 Original line number Diff line number Diff line Loading @@ -391,6 +391,8 @@ namespace netplus { ssl(const std::map<std::string, CertificateBundle>& certs, const std::string& addr, int port, int maxconnections, int sockopts); void setCertificates(const std::map<std::string, CertificateBundle>& certs); void accept(std::unique_ptr<socket>& csock, bool nonblock) override; void handshake_after_accept() override { _tls.handshake_after_accept(); } void handshake_after_connect() override { _tls.handshake_after_connect(); } Loading src/ssl.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,13 @@ ssl::ssl(std::shared_ptr<const std::map<std::string, CertificateBundle>> shared_ _Type = sockettype::SSL; } void ssl::setCertificates(const std::map<std::string, CertificateBundle>& certs) { _tls.cert_map = std::make_shared<const std::map<std::string, CertificateBundle>>(certs); if (!certs.empty()) { _tls.selected_cert_bundle = const_cast<CertificateBundle*>(&_tls.cert_map->begin()->second); } } // ============================================================================ // Accept - Create child SSL socket for accepted connection // ============================================================================ Loading Loading
src/socket.h +2 −0 Original line number Diff line number Diff line Loading @@ -391,6 +391,8 @@ namespace netplus { ssl(const std::map<std::string, CertificateBundle>& certs, const std::string& addr, int port, int maxconnections, int sockopts); void setCertificates(const std::map<std::string, CertificateBundle>& certs); void accept(std::unique_ptr<socket>& csock, bool nonblock) override; void handshake_after_accept() override { _tls.handshake_after_accept(); } void handshake_after_connect() override { _tls.handshake_after_connect(); } Loading
src/ssl.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,13 @@ ssl::ssl(std::shared_ptr<const std::map<std::string, CertificateBundle>> shared_ _Type = sockettype::SSL; } void ssl::setCertificates(const std::map<std::string, CertificateBundle>& certs) { _tls.cert_map = std::make_shared<const std::map<std::string, CertificateBundle>>(certs); if (!certs.empty()) { _tls.selected_cert_bundle = const_cast<CertificateBundle*>(&_tls.cert_map->begin()->second); } } // ============================================================================ // Accept - Create child SSL socket for accepted connection // ============================================================================ Loading