Перемешал файлы сертификата SSL моей виртуальной машины

Я пытаюсь создать новый сертификат SSL с openssl req -x509 -nodes -days 365 -newkey rsa: 2048 -keyout /etc/ssl/private/apache-selfsigned.key - из /etc/ssl/certs/apache-selfsigned.crt[11145917 visible.

I a m получаю эту ошибку вывода:

Can't open /usr/lib/ssl/openssl.cnf for reading, No such file or directory
140188383974784:error:02001002:system library:fopen:No such file or directory:../crypto/bio/bss_file.c:74:fopen('/usr/lib/ssl/openssl.cnf','r')
140188383974784:error:2006D080:BIO routines:BIO_new_file:no such file:../crypto/bio/bss_file.c:81:
Generating a RSA private key
...................................+++++
....................................................................+++++
writing new private key to '/etc/ssl/private/apache-selfsigned.key'
-----
unable to find 'distinguished_name' in config
problems making Certificate Request
140188383974784:error:0E06D06A:configuration file routines:NCONF_get_string:no conf or environment variable:../crypto/conf/conf_lib.c:272:

Как я могу это исправить?

0
задан 21 January 2019 в 18:24
1 ответ

Файл /usr/lib/ssl/openssl.cnf (которая должна быть символической ссылкой на /etc/ssl/openssl.cnf ) отсутствует, поэтому openssl не может прочитать свою конфигурацию. Я не уверен, как вам удалось его удалить, но я думаю, что наиболее верное решение - переустановить пакет openssl с помощью следующей команды (я предполагаю, что вы используете систему на основе Debian) :

sudo apt install openssl --reinstall
0
ответ дан 5 December 2019 в 04:21

Теги

Похожие вопросы