Skip to content

Commit

Permalink
Merge pull request #460 from vonsch/master
Browse files Browse the repository at this point in the history
load whole ssl certificate chain when loading certificates
  • Loading branch information
grobian authored Aug 6, 2024
2 parents 1dec00d + e0adf80 commit 7b8ddf9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions receptor.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ ssllisten(listener *lsnr)
#endif

/* load certificates */
if (SSL_CTX_use_certificate_file(
lsnr->ctx, lsnr->pemcert, SSL_FILETYPE_PEM) <= 0)
if (SSL_CTX_use_certificate_chain_file(
lsnr->ctx, lsnr->pemcert) <= 0)
{
char *err = ERR_error_string(ERR_get_error(), NULL);
SSL_CTX_free(lsnr->ctx);
Expand Down
4 changes: 1 addition & 3 deletions server.c
Original file line number Diff line number Diff line change
Expand Up @@ -939,9 +939,7 @@ server_queuereader(void *d)
int ret;

/* issue #444 */
ret = SSL_use_certificate_file(sstrm->hdl.ssl,
self->mtlspemcert,
SSL_FILETYPE_PEM);
ret = SSL_use_certificate_chain_file(sstrm->hdl.ssl, self->mtlspemcert);
if (ret == 1) {
ret = SSL_use_PrivateKey_file(sstrm->hdl.ssl,
self->mtlspemkey,
Expand Down

0 comments on commit 7b8ddf9

Please sign in to comment.