obs-outputs: Add support for and use mbedTLS for SSL

This diff adds mbedTLS support to the obs-outputs plugin.  PolarSSL and
mbedTLS have grown so different between 2015-or-so when libRTMP was
written, and now it's no longer feasible to just use the USE_POLARSSL
flag.

This commit adds a WITH_RTMPS tri-state CMake variable (auto/on/off),
set to "Auto" by default.  "Auto" will use RTMPS if mbedTLS is found,
otherwise will disable RTMPS.  "On" will make it require mbedTLS,
otherwise fails configuration, and "Off" disables RTMPS support
altogether.

Closes obsproject/obs-studio#1360
This commit is contained in:
Michael Goulet
2018-07-03 15:02:11 -07:00
committed by jp9000
parent 4e07ac17d9
commit e67e2e12e6
11 changed files with 622 additions and 119 deletions

View File

@@ -438,6 +438,15 @@ static void set_output_error(struct rtmp_stream *stream)
}
#endif
// non platform-specific errors
if (!msg) {
switch (stream->rtmp.last_error_code) {
case -0x2700:
msg = obs_module_text("SSLCertVerifyFailed");
break;
}
}
obs_output_set_last_error(stream->output, msg);
}