From 6735c52a8a1b094931a76ada7a180348f90ef66f Mon Sep 17 00:00:00 2001 From: Ivan Fedorov Date: Wed, 7 Dec 2022 16:17:58 +0300 Subject: [PATCH] Added skip_ssl_verify setting to OX push driver --- .../push-notification/push-notification-driver-ox.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugins/push-notification/push-notification-driver-ox.c b/src/plugins/push-notification/push-notification-driver-ox.c index f2e19ae9718..b336fe626ad 100644 --- a/src/plugins/push-notification/push-notification-driver-ox.c +++ b/src/plugins/push-notification/push-notification-driver-ox.c @@ -49,6 +49,8 @@ struct push_notification_driver_ox_config { char *cached_ox_metadata; time_t cached_ox_metadata_timestamp; + + bool skip_ssl_verify; }; /* This is data specific to an OX driver transaction. */ @@ -75,6 +77,8 @@ push_notification_driver_ox_init_global( http_set.event_parent = user->event; mail_user_init_ssl_client_settings(user, &ssl_set); http_set.ssl = &ssl_set; + if (config->skip_ssl_verify) + http_set.verify_remote_cert = FALSE; ox_global->http_client = http_client_init(&http_set); } @@ -110,6 +114,9 @@ push_notification_driver_ox_init(struct push_notification_driver_config *config, dconfig->use_unsafe_username = hash_table_lookup(config->config, (const char *)"user_from_metadata") != NULL; + dconfig->skip_ssl_verify = + hash_table_lookup(config->config, + (const char*)"skip_ssl_verify") != NULL; e_debug(dconfig->event, "Using URL %s", tmp);