Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Commit

Permalink
[#26] Use SSL_CTX_use_certificate_chain_file
Browse files Browse the repository at this point in the history
(reference #26)

Via @mannol

```
Currently, libevhtp is using SSL_CTX_use_certificate_file to load a
certificate file. That function lacks the ability to load the pinned
certificate chain (if any) which has a consequence of connecting clients
not trusting the received certificate. By using
SSL_CTX_use_certificate_chain_file we give the libssl the ability to
read and send the entire certificate chain (if any), which clients can
check against.
```
  • Loading branch information
NathanFrench committed Dec 6, 2017
1 parent 0848e08 commit 4c4eb3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion evhtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -4878,7 +4878,7 @@ evhtp_ssl_init(evhtp_t * htp, evhtp_ssl_cfg_t * cfg)
break;
} /* switch */

SSL_CTX_use_certificate_file(htp->ssl_ctx, cfg->pemfile, SSL_FILETYPE_PEM);
SSL_CTX_use_certificate_chain_file(htp->ssl_ctx, cfg->pemfile);

char * const key = cfg->privfile ? cfg->privfile : cfg->pemfile;

Expand Down

0 comments on commit 4c4eb3a

Please sign in to comment.