Add option for HTTPS clients to not verify the peer's certificate

This commit is contained in:
2025-11-29 19:56:09 +01:00
parent 008772aef1
commit 954bcb7e3e
8 changed files with 70 additions and 10 deletions
+3 -1
View File
@@ -173,6 +173,7 @@ typedef struct {
ClientSecureContext *client_secure_context;
ServerSecureContext *server_secure_context;
SSL *ssl;
bool dont_verify_cert;
#endif
} Socket;
@@ -312,7 +313,8 @@ typedef struct {
// one succedes. If secure=true, the socket uses TLS.
// Returns 0 on success, -1 on error.
int socket_connect(SocketManager *sm, int num_targets,
ConnectTarget *targets, bool secure, void *user);
ConnectTarget *targets, bool secure, bool dont_verify_cert,
void *user);
int socket_recv(SocketManager *sm, SocketHandle handle,
char *dst, int max);