From nobody Fri Oct 25 19:37:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=patchew-devel-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1520963153298603.6776866013993; Tue, 13 Mar 2018 10:45:53 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 630EA18C368; Tue, 13 Mar 2018 17:45:52 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 562D35E1D3; Tue, 13 Mar 2018 17:45:52 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 4C161181B9FD; Tue, 13 Mar 2018 17:45:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2DHjp3g009083 for ; Tue, 13 Mar 2018 13:45:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3A7A211301D0; Tue, 13 Mar 2018 17:45:51 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-116-103.ams2.redhat.com [10.36.116.103]) by smtp.corp.redhat.com (Postfix) with ESMTP id BE69711301CD for ; Tue, 13 Mar 2018 17:45:50 +0000 (UTC) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Tue, 13 Mar 2018 18:45:43 +0100 Message-Id: <20180313174545.14341-4-pbonzini@redhat.com> In-Reply-To: <20180313174545.14341-1-pbonzini@redhat.com> References: <20180313174545.14341-1-pbonzini@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 3/5] deploy: allow specifying CA path instead of fingerprint X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 13 Mar 2018 17:45:52 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The Arch wiki suggests that GMail changes its fingerprint occasionally; allow using a CA database (likely the system database, which is the default) instead of manually passing the fingerprint. Signed-off-by: Paolo Bonzini --- scripts/patchew-importer | 7 ++++++- scripts/playbooks/deploy-importers.yml | 4 ++++ scripts/playbooks/templates/importer-config.j2 | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/patchew-importer b/scripts/patchew-importer index 5e80fb5..d9de74f 100755 --- a/scripts/patchew-importer +++ b/scripts/patchew-importer @@ -48,12 +48,17 @@ remotehost =3D $IMAP_SERVER remoteuser =3D $IMAP_USER remotepass =3D $IMAP_PASS ssl=3D yes -cert_fingerprint =3D $IMAP_CERT_FINGERPRINT folderfilter =3D lambda foldername: foldername in [ $(for x in $IMAP_FOLDERS; do printf "'$x',"; done) ] EOF =20 +if test -n "$IMAP_CERT_FINGERPRINT"; then + echo "cert_fingerprint =3D $IMAP_CERT_FINGERPRINT" >>$offlineimap_rc +elif test -n "$SSL_CACERT_PATH"; then + echo "sslcacertfile =3D $SSL_CACERT_PATH" >> $offlineimap_rc +fi + IMPORTED_DIR=3D$BASEDIR/imported mkdir -p $IMPORTED_DIR =20 diff --git a/scripts/playbooks/deploy-importers.yml b/scripts/playbooks/dep= loy-importers.yml index 61e6057..8d362ee 100644 --- a/scripts/playbooks/deploy-importers.yml +++ b/scripts/playbooks/deploy-importers.yml @@ -28,6 +28,10 @@ prompt: "IMAP cert fingerprint" default: "" private: no + - name: "ssl_cacert_path" + prompt: "Path to SSL certificate authorities bundle" + default: "/etc/pki/tls/certs/ca-bundle.crt" + private: no - name: "imap_folders" prompt: "IMAP folders to look for patches" default: "INBOX" diff --git a/scripts/playbooks/templates/importer-config.j2 b/scripts/playb= ooks/templates/importer-config.j2 index 20fd2b8..b6bc844 100644 --- a/scripts/playbooks/templates/importer-config.j2 +++ b/scripts/playbooks/templates/importer-config.j2 @@ -8,3 +8,5 @@ IMAP_PASS=3D{{ imap_pass }} IMAP_CERT_FINGERPRINT=3D{{ imap_cert_fingerprint }} IMAP_FOLDERS=3D{{ imap_folders }} IMAP_DELETE_AFTER_IMPORT=3D{{ imap_delete_after_import }} + +SSL_CACERT_PATH=3D{{ ssl_cacert_path }} --=20 2.14.3 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel