Skip to content

Commit

Permalink
Fix to be able to set a verification "mode" to the
Browse files Browse the repository at this point in the history
SSL_CTX_set_verify() function without having to set a
custom (*verify_callback).

It was previously unable to only switch/select SSL_VERIFY_CLIENT_ONCE,
SSL_VERIFY_FAIL_IF_NO_PEER_CERT, SSL_VERIFY_PEER or SSL_VERIFY_NONE
  • Loading branch information
okoeroo committed Dec 31, 2011
1 parent 4df9e40 commit f3c3f37
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions evhtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2512,10 +2512,7 @@ evhtp_ssl_init(evhtp_t * htp, evhtp_ssl_cfg_t * cfg) {

SSL_CTX_load_verify_locations(htp->ssl_ctx, cfg->cafile, cfg->capath);
X509_STORE_set_flags(SSL_CTX_get_cert_store(htp->ssl_ctx), cfg->store_flags);

if (cfg->x509_verify_cb != NULL) {
SSL_CTX_set_verify(htp->ssl_ctx, cfg->verify_peer, cfg->x509_verify_cb);
}
SSL_CTX_set_verify(htp->ssl_ctx, cfg->verify_peer, cfg->x509_verify_cb);

if (cfg->x509_chk_issued_cb != NULL) {
htp->ssl_ctx->cert_store->check_issued = cfg->x509_chk_issued_cb;
Expand Down

0 comments on commit f3c3f37

Please sign in to comment.