From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::228]) by sourceware.org (Postfix) with ESMTPS id 164D23858C60 for ; Fri, 7 Jul 2023 08:41:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 164D23858C60 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=seketeli.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=seketeli.org X-GND-Sasl: dodji@seketeli.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seketeli.org; s=gm1; t=1688719268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7yBO0HikjcSdTK1Xd0m1hZxYH7zbfauEPBjP1K+/MQ8=; b=fgUybc9xRcAQYwM4P24GRwMD7OesBWBIuLBOrGxdNlIY52miQJdx1Zj6FH2ERyge8ug5IR +JVt9nRNa+8geMVnEqA9hsQdaKal74YGDhBwDRzL3X0YXuC6cONfRfXFoK0NMDxA4Qdax4 1tIAe31w5uNDy5yOZ3mMU/eT++HF6qeXakvz0PNpzlBAyxmBw+EInjPHezqFyPGLGAQmF+ CxDKUuk5M8EBXIBIm3OGTUiCiwMU1Ko3YHrMp0hJK38lXl3hN97i34X1yz+ZqDbFYh8kvq GhyyF/1XHU7G3bf7A7nzgBm+Luy2Vz/QHpyRZFhOoKLcOhWlGQQfd+mt1KOE0Q== X-GND-Sasl: dodji@seketeli.org Received: by mail.gandi.net (Postfix) with ESMTPSA id 561E21BF204; Fri, 7 Jul 2023 08:41:08 +0000 (UTC) Received: by localhost (Postfix, from userid 1000) id 8CF51B4FFD; Fri, 7 Jul 2023 10:41:07 +0200 (CEST) From: Dodji Seketeli To: Dodji Seketeli via Libabigail Cc: Dodji Seketeli Subject: Re: [PATCH, applied] fedabipkgdiff: Don't choke Koji servers with self-signed SSL certs Organization: Me, myself and I References: <87wmzd1dxp.fsf@redhat.com> X-Operating-System: CentOS Stream release 9 X-URL: http://www.seketeli.net/~dodji Date: Fri, 07 Jul 2023 10:41:07 +0200 In-Reply-To: <87wmzd1dxp.fsf@redhat.com> (Dodji Seketeli via Libabigail's message of "Thu, 06 Jul 2023 13:23:30 +0200") Message-ID: <87o7ko15cs.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Dodji Seketeli via Libabigail a =C3=A9crit: > Hello, > > When doing some tests on particular Koji instances, the > Brew::getPackage function was choking because its underlying http > client would could not verify the self-signed SSL certificate used by > the server. > > This patch sets the default option of the client so that it avoids > verifying SSL certificates altogether. > > * fedabipkgdiff (Brew::__init__): Se the "no_ssl_verify" option to > false by default. This patch triggered some errors, unfortunately. So I've applied this one to fix those. >From 3c68b44ea459e63769f7b498d70472c74727260d Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Thu, 6 Jul 2023 16:03:22 +0200 Subject: [PATCH] fedabipkgdiff: Fix previous commit In the previous commit, I wrongly assumed that all Brew koji session objects have a an "opts" attribute. Fixed thus. * tools/fedabipkgdiff (Brew::__init__): Do not try to access the 'opts' attribute on sessions that don't have any. Signed-off-by: Dodji Seketeli --- tools/fedabipkgdiff | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/fedabipkgdiff b/tools/fedabipkgdiff index d961c7dd..ca94a3f9 100755 --- a/tools/fedabipkgdiff +++ b/tools/fedabipkgdiff @@ -662,7 +662,8 @@ class Brew(object): # I am instructing the http client to avoid verifying SSL # certificates by default as some Koji server instance might # use self-signed certficates that can't be easily verified. - self.session.opts.setdefault('no_ssl_verify', True) + if (hasattr(self.session, 'opts')): + self.session.opts.setdefault('no_ssl_verify', True) =20 @log_call def listRPMs(self, buildID=3DNone, arches=3DNone, selector=3DNone): --=20 2.39.3 --=20 Dodji