Skip to content

Commit 54286cf

Browse files
committed
OpenSSL backend: Use nicer error strings for system errors
1 parent 28862ff commit 54286cf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

librb/src/openssl.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,9 @@ rb_get_random(void *const buf, const size_t length)
563563
const char *
564564
rb_get_ssl_strerror(rb_fde_t *const F)
565565
{
566+
if (ERR_GET_LIB(F->ssl_errno) == ERR_LIB_SYS)
567+
return strerror(ERR_GET_REASON(F->ssl_errno));
568+
566569
return rb_ssl_strerror(F->ssl_errno);
567570
}
568571

0 commit comments

Comments
 (0)