Главная > Blog, Freebsd > Новые сертификаты для stunnel

Новые сертификаты для stunnel

2 863

Закончился срок действия сертификатов для stunnel, в результате почтовый клиент The BAT перестал подключаться к серверу с ошибкой сертификата:

!04.06.2013, 09:03:26: IMAP — Приветствие TLS не завершено. Недействительный сертификат сервера (Срок действия этого S/MIME сертификата истек).


Поехали делать новый сертификат. Сделаем в этот раз на 3 года:

# cd /usr/local/etc/stunnel
# openssl req -new -x509 -days 1095 -nodes -out server.cert -keyout server.key
Generating a 1024 bit RSA private key
………………………………………………………++++++
……………..++++++
writing new private key to ‘server.key’
——
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter ‘.’, the field will be left blank.
——
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter ‘.’, the field will be left blank.
——
Country Name (2 letter code) [AU]:RU
State or Province Name (full name) [Some-State]:Moscow region
Locality Name (eg, city) []:Gorod
Organization Name (eg, company) [Internet Widgits Pty Ltd]:IT
Organizational Unit Name (eg, section) []:IT
Common Name (eg, YOUR name) []:server.server.ru
Email Address []:admin@server.ru

Далее проверяем, чтобы в конфиге stunnel стояли правильные пути на ваши новые сертификаты:

cert = /usr/local/etc/stunnel/server.cert
key = /usr/local/etc/stunnel/server.key

  1. Пока что нет комментариев.
  1. Пока что нет уведомлений.

.