2023-07-26 18:55:24 +03:00
|
|
|
---
|
|
|
|
title: Добавление самоподписанных сертификатов в доверенное хранилище
|
2023-09-24 18:43:27 +03:00
|
|
|
description: Astra Linux (Debian based) + Alt Linux (RHEL based)
|
2023-07-26 18:55:24 +03:00
|
|
|
date: 2023-05-12T18:20:00+05:00
|
2023-09-24 18:43:27 +03:00
|
|
|
tags: [linux, astra, alt, tls]
|
2023-07-26 18:55:24 +03:00
|
|
|
---
|
|
|
|
## Получение корневого сертификата
|
2023-12-26 01:34:28 +03:00
|
|
|
|
|
|
|
```bash
|
2024-01-22 16:49:28 +03:00
|
|
|
echo quit | openssl s_client -showcerts -servername <websi.te> -connect <websi.te>:443 > <certificate>.crt
|
2023-07-26 18:55:24 +03:00
|
|
|
```
|
|
|
|
|
2023-09-24 18:43:27 +03:00
|
|
|
## Astra Linux
|
|
|
|
|
|
|
|
### Перемещение сертификата
|
2023-12-26 01:34:28 +03:00
|
|
|
|
2023-09-24 18:58:33 +03:00
|
|
|
```shell
|
2024-01-22 16:49:28 +03:00
|
|
|
cp <certificate>.crt /usr/local/share/ca-certificates
|
2023-07-26 18:55:24 +03:00
|
|
|
```
|
|
|
|
|
2023-09-24 18:43:27 +03:00
|
|
|
### Обновление состава доверенного хранилища
|
2023-12-26 01:34:28 +03:00
|
|
|
|
2023-09-24 18:58:33 +03:00
|
|
|
```shell
|
2023-07-26 18:55:24 +03:00
|
|
|
dpkg-reconfigure ca-certificates
|
|
|
|
```
|
2023-09-24 18:43:27 +03:00
|
|
|
|
|
|
|
## Alt Linux
|
|
|
|
|
|
|
|
### Перемещение сертификата
|
2023-12-26 01:34:28 +03:00
|
|
|
|
2023-09-24 18:58:33 +03:00
|
|
|
```shell
|
2024-01-22 16:49:28 +03:00
|
|
|
cp <certificate>.crt /etc/pki/ca-trust/source/anchors/
|
2023-09-24 18:43:27 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
### Обновление состава доверенного хранилища
|
2023-12-26 01:34:28 +03:00
|
|
|
|
2023-09-24 18:58:33 +03:00
|
|
|
```shell
|
2023-09-24 18:43:27 +03:00
|
|
|
update-ca-trust enable
|
|
|
|
update-ca-trust extract
|
|
|
|
```
|