ZyklonB: fix certificate verification

This commit is contained in:
Přemysl Eric Janouch 2015-07-12 22:10:28 +02:00
parent e86dc2fbcd
commit b9241bdef9
1 changed files with 2 additions and 3 deletions

View File

@ -322,9 +322,8 @@ irc_initialize_ssl_ctx (struct bot_context *ctx, struct error **e)
bool verify;
if (!irc_get_boolean_from_config (ctx, "ssl_verify", &verify, e))
return false;
if (!verify)
SSL_CTX_set_verify (ctx->ssl_ctx, SSL_VERIFY_NONE, NULL);
SSL_CTX_set_verify (ctx->ssl_ctx,
verify ? SSL_VERIFY_PEER : SSL_VERIFY_NONE, NULL);
const char *ca_file = str_map_find (&ctx->config, "ca_file");
const char *ca_path = str_map_find (&ctx->config, "ca_path");