From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id y4eoIvjOMGcESwEAe85BDQ:P1 (envelope-from ) for ; Sun, 10 Nov 2024 15:19:20 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id y4eoIvjOMGcESwEAe85BDQ (envelope-from ) for ; Sun, 10 Nov 2024 16:19:20 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=XOSbi471; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=Tht35DFM; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1731251960; a=rsa-sha256; cv=none; b=Z+aqYEbaQ559hQrUl5hWMU2AX1qCXZhrORqrv2hu2NgGV6UPfnGI8NlPT0CAsL43jtAmdO YoX2Vl922PTmxFIQF8QQXZZpbezfrdArf9w8AownZEW0AuRB8/t5P1rMCZvCREC7DcHjyL sc6H0clS5j3D2IzQGtQmH9QLEhGz+fDZaHcyZN+RmfHkWQ9B8BrEf5ngDCjGN80BZ2LrX0 9KSMY38kJK3NkrOUSilEt1Ta43vbuhRUMh1eXEbdMjF/KZQcJ9sCQnS88b2EfOCaCm71A0 WOpyXfY42WbONhE5DPM33IrD3Lj2QysitnGPeWEab7pICDBG+AfMBYt2n2paKA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=XOSbi471; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=Tht35DFM; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1731251960; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=1qu3MkSpehvazY4tAnwaueINFVaElrVPTE2XYRzhNsk=; b=F0lHxqXuyjsIr9ET8+IWMjQTPr/TmV9n16omUkCYkB1yYeFIfLKFQiU+pXygF0IxnTVCHz MUlv76PR8fGLrAEqjePsidN/Tr4ICB+k5JaURklQPpq0a8gwyblaE+o9zBVx9KZBSBdSWg fsUwPVE5zhxA4c1EqBS46W2Mx/rkASuQjtJOEnMZWAO8/bo0MERoVBWDyI5FGhBQNCDZn3 o7N3qJCo4e7sR9wtLGs70vNH/rqn7LN4D9rQpdjedoHf/2OkN2y2tEDHibMqUhcsEoWdKl 1EsMfy+womyC+nPvAi5q3B7R+cWAhX+n4H2rOKgq7DL8CxX2toJkDsUh43oYvA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1530E1DAA1 for ; Sun, 10 Nov 2024 16:19:20 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tA9iT-0008Tg-2K; Sun, 10 Nov 2024 10:19:05 -0500 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 1tA9iQ-0008T9-6W for bug-guix@gnu.org; Sun, 10 Nov 2024 10:19:03 -0500 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 1tA9iP-0002b6-U6 for bug-guix@gnu.org; Sun, 10 Nov 2024 10:19:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=1qu3MkSpehvazY4tAnwaueINFVaElrVPTE2XYRzhNsk=; b=XOSbi4712wuufVrrgJ9WHKlW/MwJhDHeEqlL+YS/uIYSCWvL1ZNoys9TFlsZkck6+/4H5TfE2UBQhUpykZGMXWwxISgyF+emkT/LYneVEnqhUaTInbL/BO/0twYbuZyOwWbAb51w/MbFrdKiOi/zTZNowgTBknMpVm+wHxBJ3qVRdxVxOtz2lAFRIK57jfBSu48fRqtvh8lo9b1U/Aghrc1QBpDZ6dLxqaQ6CAM+W7a6RIaTYA22mur+bMmqP3v92zwahQEKrs1oRh1W3nOkX8hf0kKfp8iNLTB5mBOWJmfMOL3H0IkhSIuqgvqegSr39+QW8r8Y5KKs8sNU6Sen+Q==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tA9iP-0006pp-Pa for bug-guix@gnu.org; Sun, 10 Nov 2024 10:19:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#46779: GnuTLS uses the hard-coded /etc/ssl/certs location for TLS certificates Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 10 Nov 2024 15:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46779 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Roel Janssen Cc: Mark H Weaver , Ludovic =?UTF-8?Q?Court=C3=A8s?= , 46779@debbugs.gnu.org Received: via spool by 46779-submit@debbugs.gnu.org id=B46779.173125190126217 (code B ref 46779); Sun, 10 Nov 2024 15:19:01 +0000 Received: (at 46779) by debbugs.gnu.org; 10 Nov 2024 15:18:21 +0000 Received: from localhost ([127.0.0.1]:56310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tA9hl-0006on-Fe for submit@debbugs.gnu.org; Sun, 10 Nov 2024 10:18:21 -0500 Received: from mail-pl1-f179.google.com ([209.85.214.179]:51697) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tA9hi-0006oY-PS for 46779@debbugs.gnu.org; Sun, 10 Nov 2024 10:18:19 -0500 Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-210e5369b7dso38365865ad.3 for <46779@debbugs.gnu.org>; Sun, 10 Nov 2024 07:18:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731251832; x=1731856632; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=1qu3MkSpehvazY4tAnwaueINFVaElrVPTE2XYRzhNsk=; b=Tht35DFMM+hE+wGVbUQGNGkmDRwoKTXno3k8Y1cJVqohSg3E8lmOlBo9xOhaGuzCli 059eHHSpB87SnLVM1v/G/gacrigM3kQ6FxIQw9PpYnSXPbTh1HKx6FP1pc5aLJS8I9MA syXixxMzX6fpc+bg3qBcqGdaCQcxqcLvQlJS1Tmr3+VE2pD3Y+SXub3p1olUG3ufnN/V xF0uSCJ8z/l/V6Mn+lHlfeHMrkBAD6BYrMiFBWtrDgPNlVGVatNDkPqe5N+Gb/L0Tl31 S7mNfsq5baim/SNUf+JrIkAMLBC605GnGWfunW248zDzMZOaC1wlog1WuDDr1SAOpNgx WURQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731251832; x=1731856632; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=1qu3MkSpehvazY4tAnwaueINFVaElrVPTE2XYRzhNsk=; b=SVu1JPKy+Rs3fxDqGaq4XUtSPuhZipf69xy+tVXN5g/9RU8qmqk+D9lOS4i5gzx5Xr qBD0vjlIlhTuX97wFC7j7rrMqnab6jujabmR2Uhjva9wlLfvnZI4zcNzuNB5OS1xkAN7 ImQFWdQlP1M0RBRa+QJlhYO79Qb/sAtACbEFQOWR2WF08e1/TLoNbiSXjHeGNXFN7fJP KGLd9eog88UEx4N7XQnwK+ZMC5zeYhuR9C4d1tRfYZCnwG4rekpZzcLuT6NxbH+TTP65 rsMityr13ys6neALBNSZigSbMj+WGHwvSDd9yA8dlQASt/fIgZYADHvjf7jS0SjcjW3q FKsg== X-Forwarded-Encrypted: i=1; AJvYcCX4QX9GXj1gQmx2CsV6gjzEZ1mLtNmxvoh5HcOLp+4OxAcLkf0H730BogprSgVROS3CyH/Qxw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwToEVqOnHpRuiv0iYDGp/udMUq6Rfe72kUYCCANWRLg5rY97Ag /IvoGOgUKeeh1SXichPCT1xHeGz2MP8Tf6kpURGT49Fb5AsFQwieVRtCMA== X-Google-Smtp-Source: AGHT+IEnBjH4MnlMTIIvDaoJyJW51cHqmRsHIKH3ANJkYVOW7ejXkcGT99+rJ2Tkcn9yNyWFHuuldQ== X-Received: by 2002:a17:902:ec88:b0:20b:7210:5859 with SMTP id d9443c01a7336-21183d5553bmr130427685ad.38.1731251832235; Sun, 10 Nov 2024 07:17:12 -0800 (PST) Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21177e59c3asm60763795ad.194.2024.11.10.07.17.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Nov 2024 07:17:11 -0800 (PST) From: Maxim Cournoyer In-Reply-To: <02120ab2080916fba3d6ff6b6909e4d478739b10.camel@gnu.org> (Roel Janssen's message of "Mon, 11 Oct 2021 12:59:24 +0200") References: <87im6f9aq2.fsf@gmail.com> <87y2f7td00.fsf@gnu.org> <87o8fen3d0.fsf@netris.org> <87k0in1gur.fsf@netris.org> <02120ab2080916fba3d6ff6b6909e4d478739b10.camel@gnu.org> Date: Mon, 11 Nov 2024 00:17:06 +0900 Message-ID: <87pln3azkd.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -0.38 X-Spam-Score: -0.38 X-Migadu-Queue-Id: 1530E1DAA1 X-Migadu-Scanner: mx10.migadu.com X-TUID: samX5mwLl8rY Hi, I was looking at what Nix does, and they carry this patch, under pkgs/development/libraries/gnutls/nix-ssl-cert-file.patch: --8<---------------cut here---------------start------------->8--- allow overriding system trust store location via $NIX_SSL_CERT_FILE --- a/lib/system/certs.c +++ b/lib/system/certs.c @@ -404,6 +404,10 @@ gnutls_x509_trust_list_add_system_trust(gnutls_x509_trust_list_t list, unsigned int tl_flags, unsigned int tl_vflags) { - return add_system_trust(list, tl_flags | GNUTLS_TL_NO_DUPLICATES, - tl_vflags); + tl_flags = tl_flags|GNUTLS_TL_NO_DUPLICATES; + const char *file = secure_getenv("NIX_SSL_CERT_FILE"); + return file + ? gnutls_x509_trust_list_add_trust_file( + list, file, NULL/*CRL*/, GNUTLS_X509_FMT_PEM, tl_flags, tl_vflags) + : add_system_trust(list, tl_flags, tl_vflags); } --8<---------------cut here---------------end--------------->8--- I guess we could rename NIX_SSL_CERT_FILE to just SSL_CERT_FILE in the above patch and add the $SSL_CERT_FILE search path to bring us closer to what OpenSSL supports? I got interested in this problem again as the glib-networking now expect a valid trust store to exist, and fails half its test suite without it (and gnutls expecting a fixed location, I can't (easily?) fix this in the build environment). -- Thanks, Maxim