Skip to content

Commit 3244eb2

Browse files
pfitzsebaviks
authored andcommitted
fix: throw error instead of assertion for CA config read failure
1 parent b47cbd9 commit 3244eb2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ssl.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ mutable struct SSLContext
162162
ssl_context, 33, SSL_MODE_AUTO_RETRY, C_NULL)
163163
if !isempty(verify_file)
164164
ret = ca_chain!(ssl_context, verify_file)
165-
@assert ret == 1
165+
if ret != 1
166+
error("Failed to load system CA configuration.")
167+
end
166168
end
167169

168170
return ssl_context

0 commit comments

Comments
 (0)