From patchwork Thu Apr 4 05:56:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 62694 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 244EA27BBE9; Thu, 4 Apr 2024 06:58:29 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3966E27BBE2 for ; Thu, 4 Apr 2024 06:58:27 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rsG6p-00031a-DZ; Thu, 04 Apr 2024 01:57:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rsG6n-00030r-R2 for guix-patches@gnu.org; Thu, 04 Apr 2024 01:57:58 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rsG6n-0004bs-Ii for guix-patches@gnu.org; Thu, 04 Apr 2024 01:57:57 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rsG6s-0008Pz-A9 for guix-patches@gnu.org; Thu, 04 Apr 2024 01:58:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70179] [PATCH v2 1/3] gnu: python-certifi: Use system SSL certificates. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 04 Apr 2024 05:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70179 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70179@debbugs.gnu.org Cc: Efraim Flashner Received: via spool by 70179-submit@debbugs.gnu.org id=B70179.171221023332029 (code B ref 70179); Thu, 04 Apr 2024 05:58:02 +0000 Received: (at 70179) by debbugs.gnu.org; 4 Apr 2024 05:57:13 +0000 Received: from localhost ([127.0.0.1]:60226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rsG63-0008KE-4P for submit@debbugs.gnu.org; Thu, 04 Apr 2024 01:57:12 -0400 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]:45522) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rsG60-0008JG-Rm for 70179@debbugs.gnu.org; Thu, 04 Apr 2024 01:57:10 -0400 Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2d23114b19dso6585841fa.3 for <70179@debbugs.gnu.org>; Wed, 03 Apr 2024 22:57:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712210218; x=1712815018; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=BsUmFl5wRIrloXQi9/mmrAzboUVjZvnv/2oV4ilX5Ug=; b=UFuU30LuBMrOJvFd88Wg+u49sqR4hJ3CEP5ME/dUYHjjWhQO/2RxGyZtnpr/MdBdL8 gzcBJme9RMvlUAQqLTFqmSp1FTXIOiE3AZB9rfJcCQmazvWIBws6L9Rml3efhTwbJt/+ k7LvrQYNBO3/fJz+ysM5afTlmYxt8YJRM6TCtiQWkFR5z38LJk8FsIcMIPpypFBvl1Pv uZwfxVLisz+vS9KqTrGezf0AoNiujwqegeukxzxpA2LkMnrQy/eGzapATPgZY8hLbbre mbbMnDNQyurZWqzYGYFm3fWEWlM55fs8V3raj8wq46ZxOWahRPf5MTtZtMRiqyfIansI eKJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712210218; x=1712815018; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=BsUmFl5wRIrloXQi9/mmrAzboUVjZvnv/2oV4ilX5Ug=; b=WRczqZb9hA7DnkIpDnCu2ilgrTaOHeT92tr4dw0CL20Tlv9T+XPxFbTR1tvlZ0kYCe 6gDXChuvmhftjGNVk4fwWE4lfN4Rmx5NhkdcZ4USOWsqgycQvn2vgMGDd/9XDwyTOMb2 3G7qF1qMXwUB9AWXZkmXWcFeB+ve4QcJMILPyr0J+ikIx7gPo90jz7NxDd6oWJP4c8Tv 40xnVM4Qy8piw7evf6boSoqi7wJLzZAw6SwvZlGm+DwXxmXUw21GdW0qzxkcCsJJMcC+ C90LeXfjvZmoAfC30X42z+VTY5KjajoUz5LnjsQe8bJUKYvI9eita4PLOHh1RNVm/rBu IGkQ== X-Gm-Message-State: AOJu0YwSLqcU9sxMkcB7oY0+RHsL12vo/EYuWfR8lsfJDKrabclebMYf B56qOrBjhAL4bwmc5kCMzPPP8K04ljsHKm5KVgczC8/L9fsMNNqPiYU9jZ9XH8E= X-Google-Smtp-Source: AGHT+IG2KaSYwZplddo9KgdmqbSHBISS7fu4152PiLlsO1dgW5CZLqPTv5IDBEw1yBCJsMzCdnsnJQ== X-Received: by 2002:a2e:aa16:0:b0:2d6:8e88:5a6c with SMTP id bf22-20020a2eaa16000000b002d68e885a6cmr1017889ljb.49.1712210217695; Wed, 03 Apr 2024 22:56:57 -0700 (PDT) Received: from localhost ([141.226.11.200]) by smtp.gmail.com with ESMTPSA id p5-20020a05600c358500b0041486a6f9fcsm1354609wmq.37.2024.04.03.22.56.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 22:56:57 -0700 (PDT) From: Efraim Flashner Date: Thu, 4 Apr 2024 08:56:44 +0300 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/python-crypto.scm (python-certifi)[replacement]: New field. (python-certifi/fixed): Provide a python-certifi which only offers to use the system's SSL certificates. Change-Id: Ie1871be42988dff3cccfe24bca626149fee0f371 --- gnu/packages/python-crypto.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index 3e1472a6c9..05b6c82fd9 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -469,6 +469,7 @@ (define-public python-certifi (package (name "python-certifi") (version "2022.6.15") + (replacement python-certifi/fixed) (source (origin (method url-fetch) (uri (pypi-uri "certifi" version)) @@ -484,6 +485,39 @@ (define-public python-certifi is used by the Requests library to verify HTTPS requests.") (license license:asl2.0))) +(define python-certifi/fixed + (package + (inherit python-certifi) + (source (origin + (inherit (package-source python-certifi)) + (snippet + #~(begin + (delete-file "certifi/cacert.pem") + (delete-file "certifi/core.py") + (with-output-to-file "certifi/core.py" + (lambda _ + (display "\"\"\" +certifi.py +~~~~~~~~~~ +This module returns the installation location of SSL_CERT_FILE or +/etc/ssl/certs/ca-certificates.crt, or its contents. +\"\"\" +import os + +_CA_CERTS = None + +try: + _CA_CERTS = os.environ [\"SSL_CERT_FILE\"] +except: + _CA_CERTS = os.path.join(\"/etc\", \"ssl\", \"certs\", \"ca-certificates.crt\") + +def where() -> str: + return _CA_CERTS + +def contents() -> str: + with open(where(), \"r\", encoding=\"ascii\") as data: + return data.read()"))))))))) + (define-public python-cryptography-vectors (package (name "python-cryptography-vectors")