Compare commits

...

2 commits

Author SHA1 Message Date
Nicholas Orlowsky f09b261b62 ssl fix
Some checks failed
Docker Build & Publish / build (push) Failing after 1h12m36s
2025-02-20 13:48:30 -05:00
Nicholas Orlowsky f1195d1f04 add shell.nix 2025-02-19 23:54:15 -05:00
4 changed files with 16 additions and 2 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use nix

View file

@ -89,12 +89,13 @@ int listen_loop(int port_number, backends::backend& be, bool tls) {
socket::anthracite_socket* client_sock;
if (tls){
client_sock = new socket::openssl_socket(*dynamic_cast<socket::openssl_socket*>(socket));
socket::openssl_socket* ssl_sock = dynamic_cast<socket::openssl_socket*>(socket);
client_sock = new socket::openssl_socket(*ssl_sock);
} else {
client_sock = new socket::anthracite_socket(*socket);
}
std::thread(handle_client, socket, std::ref(be), std::ref(fb), std::ref(thread_wait_mutex), std::ref(thread_wait_condvar), std::ref(active_threads)).detach();
std::thread(handle_client, client_sock, std::ref(be), std::ref(fb), std::ref(thread_wait_mutex), std::ref(thread_wait_condvar), std::ref(active_threads)).detach();
}
delete socket;

11
shell.nix Normal file
View file

@ -0,0 +1,11 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
nativeBuildInputs = [ pkgs.pkg-config pkgs.openssl pkgs.libgcc pkgs.boost pkgs.cmake ];
shellHook = ''
export OPENSSL_DIR="${pkgs.openssl.dev}"
export PKG_CONFIG_PATH="${pkgs.openssl.dev}/lib/pkgconfig"
export OPENSSL_NO_VENDOR=1
export OPENSSL_LIB_DIR="${pkgs.lib.getLib pkgs.openssl}/lib"
'';
}

View file

@ -7,6 +7,7 @@
#include <sstream>
#include <unordered_map>
#include <vector>
#include <span>
using namespace anthracite;