obs-outputs: Show UI error if the root certs don't load
Though this should now be very rare, it's more helpful than "Failed to connect to server". Other TLS error codes are now also stored for future use instead of copying them on a case by case basis.
This commit is contained in:
@@ -1086,10 +1086,9 @@ RTMP_Connect1(RTMP *r, RTMPPacket *cp)
|
||||
if (connect_return < 0)
|
||||
{
|
||||
#if defined(USE_MBEDTLS)
|
||||
r->last_error_code = connect_return;
|
||||
if (connect_return == MBEDTLS_ERR_X509_CERT_VERIFY_FAILED)
|
||||
{
|
||||
r->last_error_code = connect_return;
|
||||
|
||||
// show a more detailed error in the log if possible
|
||||
int verify_result = mbedtls_ssl_get_verify_result(r->m_sb.sb_ssl);
|
||||
if (verify_result)
|
||||
|
@@ -514,10 +514,18 @@ static void set_output_error(struct rtmp_stream *stream)
|
||||
case -0x2700:
|
||||
msg = obs_module_text("SSLCertVerifyFailed");
|
||||
break;
|
||||
case -0x7680:
|
||||
msg = "Failed to load root certificates for a secure TLS connection."
|
||||
#if defined(__linux__)
|
||||
" Check you have an up to date root certificate bundle in /etc/ssl/certs."
|
||||
#endif
|
||||
;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
obs_output_set_last_error(stream->output, msg);
|
||||
if (msg)
|
||||
obs_output_set_last_error(stream->output, msg);
|
||||
}
|
||||
|
||||
static void dbr_add_frame(struct rtmp_stream *stream, struct dbr_frame *back)
|
||||
|
Reference in New Issue
Block a user