aboutsummaryrefslogtreecommitdiff
path: root/zyklonb.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-07-12 22:10:28 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-07-13 00:13:14 +0200
commitb9241bdef9183c29fb3b05bae9f0810f5dc306c0 (patch)
tree1f7d65ea26a47a0e5c574a79961df5d9d537040b /zyklonb.c
parente86dc2fbcd96482e997ff0fc8ffef203277a29ed (diff)
downloadxK-b9241bdef9183c29fb3b05bae9f0810f5dc306c0.tar.gz
xK-b9241bdef9183c29fb3b05bae9f0810f5dc306c0.tar.xz
xK-b9241bdef9183c29fb3b05bae9f0810f5dc306c0.zip
ZyklonB: fix certificate verification
Diffstat (limited to 'zyklonb.c')
-rw-r--r--zyklonb.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/zyklonb.c b/zyklonb.c
index 35eac17..49d4fc5 100644
--- a/zyklonb.c
+++ b/zyklonb.c
@@ -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");