]> gitweb.factorcode.org Git - factor.git/commit
io.sockets.secure: Fix error handling for SSL calls.
authorDoug Coleman <doug.coleman@gmail.com>
Mon, 20 Dec 2021 08:11:54 +0000 (02:11 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Mon, 20 Dec 2021 08:21:58 +0000 (02:21 -0600)
commit61dd61769018c573a898db89766bbb36955cb048
treedaf425c8b42ae76eada1d815a12e055942063efa
parent48b6d17e13356c772e9a7dea6072d5c37b152ea9
io.sockets.secure: Fix error handling for SSL calls.

Fixes:
- SSL_ERROR_SYSCALL -> ERR_get_error -> 0 means EOF from server
- don't throw on SSL_ERROR_ZERO_RETURN
-- in our case, our header value is 300k so it closes the connection
- don't call shutdown if server stops talking to us
- recognize EPIPE in a place

- simplify error handling
- pass around ssl-handle, not SSL, which can be grabbed from ssl-handle with handle>>

Fixes #2487
basis/io/sockets/secure/openssl/openssl.factor
basis/io/sockets/secure/unix/unix.factor