mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Support x509 certification chiain in single pem file. v5.0.211 v6.0.122 (#4033)
Fix #3967 There is an API `SSL_use_certificate_chain_file`, which can load the certification chain and also single certificate. --------- Co-authored-by: winlin <winlinvip@gmail.com>
This commit is contained in:
parent
427104f1da
commit
5eb802daca
4 changed files with 5 additions and 3 deletions
|
@ -772,7 +772,7 @@ srs_error_t SrsSslConnection::handshake(string key_file, string crt_file)
|
|||
int r0, r1, size;
|
||||
|
||||
// Setup the key and cert file for server.
|
||||
if ((r0 = SSL_use_certificate_file(ssl, crt_file.c_str(), SSL_FILETYPE_PEM)) != 1) {
|
||||
if ((r0 = SSL_use_certificate_chain_file(ssl, crt_file.c_str())) != 1) {
|
||||
return srs_error_new(ERROR_HTTPS_KEY_CRT, "use cert %s", crt_file.c_str());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue