From patchwork Tue Nov 7 09:49:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ayoub Zaki X-Patchwork-Id: 835201 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4010:c07::23a; helo=mail-lf0-x23a.google.com; envelope-from=swupdate+bncbdbktzhrzujrbiedq3iakgqe47jp3vq@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.b="HfI8BK7L"; dkim-atps=neutral Received: from mail-lf0-x23a.google.com (mail-lf0-x23a.google.com [IPv6:2a00:1450:4010:c07::23a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yWPlm0Sxyz9s7G for ; Tue, 7 Nov 2017 20:49:23 +1100 (AEDT) Received: by mail-lf0-x23a.google.com with SMTP id a132sf3575848lfa.17 for ; Tue, 07 Nov 2017 01:49:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1510048160; cv=pass; d=google.com; s=arc-20160816; b=YmFJEQubXGKaWtECtsLzmJruXJ56wautnPu00jbtaHvtQWaZ+ppL6jh4PC2uJ85ZzZ KOnZVgKEd4IBqDZqcTEoPMxNG2RN1arQvPn/A47MtTp09B5xCKvRgTVBDjfASxYaWeP6 Edpk84Rg9GwgLZbOFyi84A7U04wMmGFoLmPbNrmPN28mgplMNx+h4MTheN1H0hfAshhG mPYFjzwTqhqnFx97JUbMvqojt1un1NrY6q1+LurQReYAmv5AKgy1gJp6nirPcuK/uS/x LIC/qId4PFhnV+/zC9xIF0bojbK/JLbMs2+nIyf1KOM6uUrJ/lY7bp0QgaeCPe6TbXWO drCg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:message-id:date:subject:to:from :arc-authentication-results:arc-message-signature:mime-version :sender:dkim-signature:arc-authentication-results; bh=/6wl1iAPewqWzDK54fIsLH1O2WXo00Bqnlemhht+qgU=; b=dJXmXfnsYGvVJealFaql86olLidOX98GrR8ucXfg2j8CbU7fVSG1KavROd027iB2vz N8PLXK1ZYrN0iADVbF6pDnzM6k3Fx90LbU9ru70jpQgfJ4rIbpIbeZdtb91uKNUpnq8E hsDzE5c32//iHC6XqFhh0OkYNUIQNuziE8YawIxkTfht5L6j1EFz7jUpxbHmmP/qD8ns 2Ts/qDmu/vzpiKFbjACU36U+7czwDw/N6roiMU76gsd2r24KYJ3BrJjZ6S3LaIWySc8K UmWzxE5Gyji6KVLHCE6uNxt8qIZ6VjDARNUceYAhsfw96jYJHJN/tigHwcLwoRdrMRdU YwGg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@embexus.com header.s=20140924 header.b=yL0cVlnZ; spf=neutral (google.com: 46.30.212.12 is neither permitted nor denied by best guess record for domain of ayoub.zaki@embexus.com) smtp.mailfrom=ayoub.zaki@embexus.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:from:to:subject:date:message-id :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=/6wl1iAPewqWzDK54fIsLH1O2WXo00Bqnlemhht+qgU=; b=HfI8BK7L9CfV3OnTWH4w73xwI0WRtkelhd05V3yGyKTwvCixHLSQiycEUR+G1SOvXV b+G2B/mzBU7giiOyoOEui3FVh/2pcdCaswBFtNG7g5xawOrUVG5qT6T/kdscNfT0q3CI VA3q5blzk5Gebr5y2p/oGyitP+Net3SQJrbEJSN7yiQ6sefVZWSbyg585w8T9fi9rY5q DvOE0FYTyqSw4FlqHL5B0ry+wCah+KF88mw0ryZg4CJJqofpnY/tBJqCLg30O1NTubW9 4X9+w33bcXjRjSIK/5D/+O4L/+K6d1WplPQQncL2bGEMiwJkiRq/BaVBjsZhL70bLtAQ /qgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:from:to:subject:date :message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=/6wl1iAPewqWzDK54fIsLH1O2WXo00Bqnlemhht+qgU=; b=uEEi679Vi5JI+D625OjZppuM+L4g+jkT9tNbi78kBJV3PZCObdM29jsIKZsDYfydYB bixvi8URMJSMoA2Ijs2POw14I4YlJYqtNk+VeSoypv+iS+cfWyP2RQXYItLOtOlMu7JL FuNcn0KapY53cHV5SCpkysmKwKfeK5WWcGdbX5zV+faPWbNXKw/M7EwVHSqVYqZZ1A+M kkmHzSL5Ebyf5UaAA1A3HhgGTPoARA2f43I/BzfaQdbv8Ifv1H2DtkcGJez00CpkCW2z lgpUNpfHosorvjlZgUoFfXtFJAFZrSAhaigiZvCMYzjV0mNSuodO2PqDXaUTGbNfgfE9 qPwA== Sender: swupdate@googlegroups.com X-Gm-Message-State: AMCzsaW7aYsHMvaK5niIVsED9ghS1CjVak1p0T3H+oZ3PNLT9frtGN1s vA7u56ZVLEplPxmyLRgWsHA= X-Google-Smtp-Source: ABhQp+Q+RDFaX9JZDZyv9ag2N6thS0pVliyEXUf8D+YMLgWs4z4+q8f7XxIrWdw6TkMeP7Kx5f5xuw== X-Received: by 10.46.65.140 with SMTP id d12mr51731ljf.11.1510048160306; Tue, 07 Nov 2017 01:49:20 -0800 (PST) MIME-Version: 1.0 X-BeenThere: swupdate@googlegroups.com Received: by 10.46.80.71 with SMTP id v7ls2070446ljd.17.gmail; Tue, 07 Nov 2017 01:49:19 -0800 (PST) X-Received: by 10.25.195.202 with SMTP id t193mr627277lff.11.1510048159757; Tue, 07 Nov 2017 01:49:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510048159; cv=none; d=google.com; s=arc-20160816; b=cfQyOLJ89BJew67Yzm8Xv5RwvMaJTGeZ0oAOa7Aq7m8AESXDkiNhx3D0fHuKKlIbrx qxbES4KovLeukDu+ekeyNHYWp5HqmxZvdzl33w6hHXzljrGrnG2VJQSQGyYak3o9haYB HW7J5ezQslbab5bcpmEzRLzxUozYvKaEs//1/lAUzIqjDGL3Rdb7j+AkR+EKTnutBWcM lJuIwtyAgnRXF9qStWQ+2AcN5QPfVk4Oy/380k9EjyCAsqWcD4mzitGJIWIktp9gqvN0 QyDzWw8Y2Zm8hLfJ0UN3/r/sqrW2Sd1EtdXbfRCWEA7Eg45NxiAFd6cndwajSKIQQkY1 x7qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:to:from:dkim-signature :arc-authentication-results; bh=ZpOGnEdtVC4CD/joghfGxLj6oqJ0A9tY/BOUP82Df0Q=; b=Gt79TAHJZnpuNdVL+Ioq/QLO164i+4u+m08Oa4HLZbVIsZev5wq2jnU71sXVaMykKC Jg6C/vso1Ko4rpVj3eYOkI1D6i7et95z/lNKzucMPJhinZe9DIzqd1tZsFVS+LS+XzoH pWbhxIvHziEBoBllVUQ+KJ6ri69InPbHFQQA39CQbZ804CXSWNXRLfx/slLVIFeu6bIt lNt54eEpOnPN3sg/4uj+WNeLD2v2txXSU6LgcalQmF2cFtz0T+QfsiELZPwOqeO1HQEx IDlm2qv6WMvpiRqreG2Yr8FUwX1UY9/UI94halYl3NUcB/ncHDUeJQcsB99/1ny0cQUV fefA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@embexus.com header.s=20140924 header.b=yL0cVlnZ; spf=neutral (google.com: 46.30.212.12 is neither permitted nor denied by best guess record for domain of ayoub.zaki@embexus.com) smtp.mailfrom=ayoub.zaki@embexus.com Received: from mailrelay3-3.pub.mailoutpod1-cph3.one.com (mailrelay3-3.pub.mailoutpod1-cph3.one.com. [46.30.212.12]) by gmr-mx.google.com with ESMTPS id w29si54562lfc.1.2017.11.07.01.49.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Nov 2017 01:49:19 -0800 (PST) Received-SPF: neutral (google.com: 46.30.212.12 is neither permitted nor denied by best guess record for domain of ayoub.zaki@embexus.com) client-ip=46.30.212.12; X-HalOne-Cookie: 579de603bb3bcd48aaac116051313bd6d20fd7cb X-HalOne-ID: ebb98a9c-c3a0-11e7-a38b-d0431ea8bb03 Received: from embexus.fritz.box (unknown [89.12.30.78]) by mailrelay3.pub.mailoutpod1-cph3.one.com (Halon) with ESMTPSA id ebb98a9c-c3a0-11e7-a38b-d0431ea8bb03; Tue, 07 Nov 2017 09:49:17 +0000 (UTC) From: Ayoub Zaki To: swupdate@googlegroups.com Subject: [swupdate][PATCH] Enable hawkbit Channel using non-strict ssl settings Date: Tue, 7 Nov 2017 10:49:17 +0100 Message-Id: <1510048157-17854-1-git-send-email-ayoub.zaki@embexus.com> X-Mailer: git-send-email 2.7.4 X-Original-Sender: ayoub.zaki@embexus.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@embexus.com header.s=20140924 header.b=yL0cVlnZ; spf=neutral (google.com: 46.30.212.12 is neither permitted nor denied by best guess record for domain of ayoub.zaki@embexus.com) smtp.mailfrom=ayoub.zaki@embexus.com Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Signed-off-by: Ayoub Zaki --- suricatta/channel_hawkbit.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/suricatta/channel_hawkbit.c b/suricatta/channel_hawkbit.c index cc30cb9..f3d00a0 100644 --- a/suricatta/channel_hawkbit.c +++ b/suricatta/channel_hawkbit.c @@ -362,7 +362,16 @@ channel_op_res_t channel_set_options(channel_t *this, (curl_easy_setopt(channel_curl->handle, CURLOPT_FOLLOWLOCATION, 1) != CURLE_OK) || (curl_easy_setopt(channel_curl->handle, CURLOPT_REDIR_PROTOCOLS, - CURLPROTO_HTTP | CURLPROTO_HTTPS) != CURLE_OK)) { + CURLPROTO_HTTP | CURLPROTO_HTTPS) != CURLE_OK) || + (curl_easy_setopt(channel_curl->handle, + CURLOPT_CAINFO, + channel_data->cafile) != CURLE_OK) || + (curl_easy_setopt(channel_curl->handle, + CURLOPT_SSLKEY, + channel_data->sslkey) != CURLE_OK) || + (curl_easy_setopt(channel_curl->handle, + CURLOPT_SSLCERT, + channel_data->sslcert) != CURLE_OK)) { result = CHANNEL_EINIT; goto cleanup; } @@ -372,21 +381,23 @@ channel_op_res_t channel_set_options(channel_t *this, CURLOPT_SSL_VERIFYHOST, 2L) != CURLE_OK) || (curl_easy_setopt(channel_curl->handle, - CURLOPT_CAINFO, - channel_data->cafile) != CURLE_OK) || - (curl_easy_setopt(channel_curl->handle, - CURLOPT_SSLKEY, - channel_data->sslkey) != CURLE_OK) || - (curl_easy_setopt(channel_curl->handle, - CURLOPT_SSLCERT, - channel_data->sslcert) != CURLE_OK) || - (curl_easy_setopt(channel_curl->handle, CURLOPT_SSL_VERIFYPEER, 1L) != CURLE_OK)) { result = CHANNEL_EINIT; goto cleanup; } } + else { + if ((curl_easy_setopt(channel_curl->handle, + CURLOPT_SSL_VERIFYHOST, + 0L) != CURLE_OK) || + (curl_easy_setopt(channel_curl->handle, + CURLOPT_SSL_VERIFYPEER, + 0L) != CURLE_OK)) { + result = CHANNEL_EINIT; + goto cleanup; + } + } switch (method) { case CHANNEL_GET: