Browse code

Merge b7673a8423ed17b78f818b349d19faa4fdd80d6d into f7965fc52f0c9b65b78004ee68b9a9b5e6222a98

Todd authored on 13/10/2021 06:07:25 • GitHub committed on 13/10/2021 06:07:25
Showing 1 changed files
... ...
@@ -39,7 +39,11 @@ static inline int tls_err_ret(char *s, tls_domains_cfg_t **tls_domains_cfg) {
39 39
 	{
40 40
 		while((err = ERR_get_error())) {
41 41
 			ret = 1;
42
-			ERR("%s%s\n", s ? s : "", ERR_error_string(err, 0));
42
+			char *errbuf = (char*)malloc(sizeof(char)*((*tls_domains_cfg)->srv_default->server_name.len+1));
43
+			memcpy(errbuf, (*tls_domains_cfg)->srv_default->server_name.s, (*tls_domains_cfg)->srv_default->server_name.len);
44
+			errbuf[(*tls_domains_cfg)->srv_default->server_name.len] = '\0';
45
+			ERR("%s%s -> %s -> verify_client is:%d\n", s ? s : "", ERR_error_string(err, 0), errbuf, (*tls_domains_cfg)->srv_default->verify_client);
46
+			free(errbuf);
43 47
 		}
44 48
 	}
45 49
 	return ret;