Skip to content

Commit

Permalink
issue ossrs#3967: support x509 certification chiain in single pem file.
Browse files Browse the repository at this point in the history
  • Loading branch information
suzp1984 committed Apr 21, 2024
1 parent 427104f commit 47ab617
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trunk/src/app/srs_app_conn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

Expand Down

0 comments on commit 47ab617

Please sign in to comment.