assorted patches

This commit is contained in:
Sergio R. Caprile authored and Sergio R. Caprile committed 2026-06-23 13:38:35 -03:00
1 parent 07a49a7a2d
commit a9df523f76
34 files changed
+1240 -592

No files matched your search

+9 -6
View File
@@ -120,14 +120,17 @@ static int mg_bio_write(BIO *bio, const char *buf, int len) {
#ifdef MG_TLS_SSLKEYLOGFILE
static void ssl_keylog_cb(const SSL *ssl, const char *line) {
FILE *f;
char *keylogfile = getenv("SSLKEYLOGFILE");
if (keylogfile == NULL) {
return;
if (keylogfile == NULL) return;
f = fopen(keylogfile, "a");
if (f != NULL) {
fprintf(f, "%s\n", line);
fflush(f);
fclose(f);
} else {
MG_ERROR(("Cannot open %s", keylogfile));
}
FILE *f = fopen(keylogfile, "a");
fprintf(f, "%s\n", line);
fflush(f);
fclose(f);
(void) ssl;
}
#endif