Skip to content

Commit 95d888e

Browse files
committed
CA-404460: Fix the exposing of Stunnel_verify_error in check_error
There are 4 error logs are checked in check_error: "Connection refused" "No host resolved" "No route to host" "Invalid argument" We can indeed find the logging in stunnel for 2 of them in stunnel 5.60, which is the version used in XS now: [gangj@xenrt10715872 stunnel]$ git grep -C 1 -wn "Connection refused" src/log.c-493- case 10061: src/log.c:494: return "Connection refused (WSAECONNREFUSED)"; src/log.c-495- case 10062: -- src/protocol.c-240- s_log(LOG_ERR, src/protocol.c:241: "SOCKS5 request failed: Connection refused"); src/protocol.c-242- break; [gangj@xenrt10715872 stunnel]$ [gangj@xenrt10715872 stunnel]$ git grep -C 1 -wn "Invalid argument" src/log.c-437- case 10022: src/log.c:438: return "Invalid argument (WSAEINVAL)"; src/log.c-439- case 10024: While the other 2 are not found: [gangj@xenrt10715872 stunnel]$ git grep -C 1 -wn "No host resolved" [gangj@xenrt10715872 stunnel]$ [gangj@xenrt10715872 stunnel]$ git grep -C 1 -wn "No route to host" [gangj@xenrt10715872 stunnel]$ But seems "No host resolved" was in the history of stunnel: ddef8f192ecfe195610000c6f6272f6b77b97e53:src/client.c: s_log(LOG_ERR, "No host resolved"); [gangj@xenrt10715872 stunnel]$ git branch --contains ddef8f192ecfe195610000c6f6272f6b77b97e53 master * private/gangj/stunnel-5.60 And I failed to find the log "No route to host" in any historical code of stunnel or openssl. So at least for the two errors "No host resolved" and "No route to host", I think we will need to test and fix them later. Signed-off-by: Gang Ji <[email protected]>
1 parent 659284e commit 95d888e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ocaml/libs/stunnel/stunnel.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ let check_verify_error line =
506506
()
507507
508508
let check_error s line =
509-
if Astring.String.is_infix ~affix:line s then
509+
if Astring.String.is_infix ~affix:s line then
510510
raise (Stunnel_error s)
511511
512512
let diagnose_failure st_proc =

0 commit comments

Comments
 (0)