From 56582e30b129fbe5814bc026575ec66bd8c978cb Mon Sep 17 00:00:00 2001 From: Max Asnaashari Date: Tue, 21 Nov 2023 19:41:06 +0000 Subject: [PATCH] shared: Read system certs from /etc instead of snapd/hostfs Signed-off-by: Max Asnaashari --- shared/network_unix.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/shared/network_unix.go b/shared/network_unix.go index eb486c1621df..2e6541c9df25 100644 --- a/shared/network_unix.go +++ b/shared/network_unix.go @@ -4,7 +4,6 @@ package shared import ( "crypto/x509" - "os" ) func systemCertPool() (*x509.CertPool, error) { @@ -14,13 +13,5 @@ func systemCertPool() (*x509.CertPool, error) { return nil, err } - // Attempt to load the system's pool too (for snaps) - if PathExists("/var/lib/snapd/hostfs/etc/ssl/certs/ca-certificates.crt") { - snapCerts, err := os.ReadFile("/var/lib/snapd/hostfs/etc/ssl/certs/ca-certificates.crt") - if err == nil { - pool.AppendCertsFromPEM(snapCerts) - } - } - return pool, nil }