Bug 55674 - Ошибки проверки сертификатов при скачивании каналов или кэша при первом использовании
Summary: Ошибки проверки сертификатов при скачивании каналов или кэша при первом испол...
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: nix (show other bugs)
Version: unstable
Hardware: x86_64 Linux
: P5 major
Assignee: boria138@altlinux.org
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-20 21:01 MSK by Egor Zakharov
Modified: 2025-08-25 11:23 MSK (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Egor Zakharov 2025-08-20 21:01:53 MSK
Где-то в системе определяется переменная $NIX_SSL_CERT_FILE, я не смог разобраться, где именно.

Она указывает на файл /etc/ssl/certs/ca-certificates.crt

Который является симлинком на /etc/pki/tls/certs/ca-bundle.trust.crt

Однако проверка сертификатов при использовании SSL проваливается и возникает ошибка, почти на любом действии:

warning: error: unable to download 'https://cache.nixos.org/nix-cache-info': SSL peer certificate or SSH remote key was not OK (60) server verification failed: certificate signer not trusted. (CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none); retrying in 270 ms
warning: error: unable to download 'https://cache.nixos.org/nix-cache-info': SSL peer certificate or SSH remote key was not OK (60) server verification failed: certificate signer not trusted. (CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none); retrying in 576 ms
warning: error: unable to download 'https://cache.nixos.org/nix-cache-info': SSL peer certificate or SSH remote key was not OK (60) server verification failed: certificate signer not trusted. (CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none); retrying in 1042 ms
warning: error: unable to download 'https://cache.nixos.org/nix-cache-info': SSL peer certificate or SSH remote key was not OK (60) server verification failed: certificate signer not trusted. (CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none); retrying in 2160 ms
warning: unable to download 'https://cache.nixos.org/nix-cache-info': SSL peer certificate or SSH remote key was not OK (60) server verification failed: certificate signer not trusted. (CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none)

Экспериментальным путём выяснил, что nix не нравится формат файла CAFile

А конкретно -----BEGIN TRUSTED CERTIFICATE-----

Если указать на файл /etc/pki/tls/certs/ca-bundle.crt в конфигурации или через переменную окружения, то всё работает. Потому что этот файл использует формат -----BEGIN CERTIFICATE-----

Соответственно, нужно либо переопределить переменную NIX_SSL_CERT_FILE в системе или добавить строчку "ssl-cert-file = /etc/pki/tls/certs/ca-bundle.crt" в /etc/nix/nix.conf
Comment 1 Repository Robot 2025-08-25 11:23:54 MSK
nix-2.30.2-alt1 -> sisyphus:

Mon Aug 25 2025 Boris Yumankulov <boria138@altlinux> 2.30.2-alt1
- new version 2.30.2
- fix ssl patch (ALT bug: 55674)