The OpenNET Project / Index page

[ новости /+++ | форум | wiki | теги | ]



"TLS 1.3 для exim, dovecot под centos 7"
Вариант для распечатки  
Пред. тема | След. тема 
Форум Информационная безопасность (Шифрование, SSH, SSL / Linux)
Изначальное сообщение [ Отслеживать ]

"TLS 1.3 для exim, dovecot под centos 7"  +/
Сообщение от suffix (ok), 11-Янв-19, 09:59 
Как реализовать ?

С осени ищу мануалы, везде спрашиваю - в ответ тишина :(

Ответить | Правка | Cообщить модератору

Оглавление

Сообщения [Сортировка по времени | RSS]


1. "TLS 1.3 для exim, dovecot под centos 7"  +/
Сообщение от int13h (ok), 11-Янв-19, 11:21 
> Как реализовать ?
> С осени ищу мануалы, везде спрашиваю - в ответ тишина :(

https://www.centos.org/forums/viewtopic.php?t=67580

Ответить | Правка | ^ к родителю #0 | Наверх | Cообщить модератору

2. "TLS 1.3 для exim, dovecot под centos 7"  +/
Сообщение от suffix (ok), 11-Янв-19, 11:28 
>> Как реализовать ?
>> С осени ищу мануалы, везде спрашиваю - в ответ тишина :(
> https://www.centos.org/forums/viewtopic.php?t=67580

Это понятно, но усилиями nginx для вебсайта по 443 мне TLS 1.3 удалось в centos 7 же прикрутить.

Может быть как-то из исходников собрать exim и dovecot чтобы в них реализовать таки TLS 1.3 ?

Но без пошагового мануала сам не смогу :(

Ответить | Правка | ^ к родителю #1 | Наверх | Cообщить модератору

3. "TLS 1.3 для exim, dovecot под centos 7"  +/
Сообщение от int13h (ok), 11-Янв-19, 12:49 
>>> Как реализовать ?
>>> С осени ищу мануалы, везде спрашиваю - в ответ тишина :(
>> https://www.centos.org/forums/viewtopic.php?t=67580
> Это понятно, но усилиями nginx для вебсайта по 443 мне TLS 1.3
> удалось в centos 7 же прикрутить.
> Может быть как-то из исходников собрать exim и dovecot чтобы в них
> реализовать таки TLS 1.3 ?
> Но без пошагового мануала сам не смогу :(

Ну, если хотите, собирайте exim с необходимой версией openssl:

https://github.com/Exim/exim/blob/master/doc/doc-txt/openssl...

Build
-----

Extract the current source of OpenSSL.  Change into that directory.

This assumes that `/opt/openssl` is not in use.  If it is, pick
something else.  `/opt/exim/openssl` perhaps.

If you pick a location shared amongst various local packages, such as
`/usr/local` on Linux, then the new OpenSSL will be used by all of those
packages.  If that's what you want, great!  If instead you want to
ensure that only software you explicitly set to use the newer OpenSSL
will try to use the new OpenSSL, then stick to something like
`/opt/openssl`.

    ./config --prefix=/opt/openssl --openssldir=/etc/ssl  \
        -L/opt/openssl/lib -Wl,-R/opt/openssl/lib         \
        enable-ssl-trace shared                           \
        enable-ssl3 enable-ssl3-method enable-weak-ssl-ciphers
    make
    make install

On some systems, the linker uses `-rpath` instead of `-R`; on such systems,
replace the parameter starting `-Wl` with: `-Wl,-rpath,/opt/openssl/lib`.
There are more variations on less common systems.

You now have an installed OpenSSL under /opt/openssl which will not be
used by any system programs.

When you copy `src/EDITME` to `Local/Makefile` to make your build edits,
choose the pkg-config approach in that file, but also tell Exim to add
the relevant directory into the rpath stamped into the binary:

    PKG_CONFIG_PATH=/opt/openssl/lib/pkgconfig

    SUPPORT_TLS=yes
    USE_OPENSSL_PC=openssl
    LDFLAGS+=-ldl -Wl,-rpath,/opt/openssl/lib

The -ldl is needed by OpenSSL 1.0.2+ on Linux and is not needed on most
other platforms.  The LDFLAGS is needed because `pkg-config` doesn't know
how to emit information about RPATH-stamping, but we can still leverage
`pkg-config` for everything else.

Then build Exim:

    make
    sudo make install


Confirming
----------

Run:

    exim -d-all+expand --version

and look for the `Library version: OpenSSL:` lines.

To look at the libraries _probably_ found by the linker, use:

    ldd $(which exim)        # most platforms
    otool -L $(which exim)    # MacOS

although that does not correctly handle restrictions imposed upon
executables which are setuid.

If the `chrpath` package is installed, then:

    chrpath -l $(which exim)

will show the DT_RPATH stamped into the binary.

Your `binutils` package should come with `readelf`, so an alternative
is to run:

    readelf -d $(which exim) | grep RPATH

It is important to use `RPATH` and not `RUNPATH`!

The gory details about `RUNPATH` (skip unless interested):
The OpenSSL library might be opened indirectly by some other library
which Exim depends upon.  If the executable does have `RUNPATH` then
that will inhibit using either of `RPATH` or `RUNPATH` from the
executable for finding the OpenSSL library when that other library tries
to load it.
In fact, if the intermediate library has a `RUNPATH` stamped into it,
then this will block `RPATH` too, and will create problems with Exim.
If you're in such a situation, and those libraries were supplied to you
instead of built by you, then you're reaching the limits of sane
repairability and it's time to prioritize rebuilding your mail-server
hosts to be a current OS release which natively pulls in an
upstream-supported OpenSSL, or stick to the OS releases of Exim.


Very Advanced
-------------

You can not use $ORIGIN for portably packing OpenSSL in with Exim with
normal Exim builds, because Exim is installed setuid which causes the
runtime linker to ignore $ORIGIN in DT_RPATH.

_If_ following the steps for a non-setuid Exim, _then_ you can use:

    EXTRALIBS_EXIM=-ldl '-Wl,-rpath,$$ORIGIN/../lib'

The doubled `$$` is needed for the make(1) layer and the quotes needed
for the shell invoked by make(1) for calling the linker.

Note that this is sufficiently far outside normal that the build-system
doesn't support it by default; you'll want to drop a symlink to the lib
directory into the Exim release top-level directory, so that lib exists
as a sibling to the build-$platform directory.

Ответить | Правка | ^ к родителю #2 | Наверх | Cообщить модератору

4. "TLS 1.3 для exim, dovecot под centos 7"  +/
Сообщение от int13h (ok), 11-Янв-19, 14:12 
>>> Как реализовать ?
>>> С осени ищу мануалы, везде спрашиваю - в ответ тишина :(
>> https://www.centos.org/forums/viewtopic.php?t=67580
> Это понятно, но усилиями nginx для вебсайта по 443 мне TLS 1.3
> удалось в centos 7 же прикрутить.
> Может быть как-то из исходников собрать exim и dovecot чтобы в них
> реализовать таки TLS 1.3 ?
> Но без пошагового мануала сам не смогу :(

Короче, я пересобрал exim в centos 7 с последним openssl.

Но стоит понимать, что это не система уже, а мусорка.


[root@localhost exim-4.91]# uname -a
Linux localhost.localdomain 3.10.0-957.1.3.el7.x86_64 #1 SMP Thu Nov 29 14:49:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux


[root@localhost exim-4.91]# openssl version
OpenSSL 1.1.1a  20 Nov 2018
[root@localhost exim-4.91]# /usr/exim/bin/exim-4.91-22 -d+all -bP transport remote_smtp
14:07:50 30740 Exim version 4.91 uid=0 gid=0 pid=30740 D=fffdffff
Support for: iconv() OpenSSL DKIM DNSSEC Event OCSP PRDR TCP_Fast_Open
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch dbm dbmjz dbmnz dnsdb
Authenticators:
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile autoreply pipe smtp
Fixed never_users: 0
Configure owner: 0:0
Size of off_t: 8
Compiler: GCC [4.8.5 20150623 (Red Hat 4.8.5-36)]
Library version: Glibc: Compile: 2.17
                        Runtime: 2.17
Library version: BDB: Compile: Berkeley DB 5.3.21: (May 11, 2012)
                      Runtime: Berkeley DB 5.3.21: (May 11, 2012)
Library version: OpenSSL: Compile: OpenSSL 1.1.1a  20 Nov 2018
                          Runtime: OpenSSL 1.1.1a  20 Nov 2018
                                 : built on: Fri Jan 11 09:04:05 2019 UTC
Library version: PCRE: Compile: 8.32
                       Runtime: 8.32 2012-11-30


.......


Проверяем:

#openssl s_client -connect localhost:465


---
SSL handshake has read 950 bytes and written 391 bytes
Verification error: self signed certificate
---
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Server public key is 1024 bit
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 18 (self signed certificate)
---
---
Post-Handshake New Session Ticket arrived:
SSL-Session:
    Protocol  : TLSv1.3
    Cipher    : TLS_AES_256_GCM_SHA384


Если хотите сделать мусорку, в которой поддерживается -- пересоберите exim. Только правильно укажите размещение библиотек openssl


Ответить | Правка | ^ к родителю #2 | Наверх | Cообщить модератору

5. "TLS 1.3 для exim, dovecot под centos 7"  +/
Сообщение от suffix (ok), 11-Янв-19, 14:39 
> Если хотите сделать мусорку, в которой поддерживается -- пересоберите exim.

Мусорку - автоматически не получаемую обновлений безопасности наверное не хочу :(

Эх, тогда ждать пару лет придётся :(

Спасибо за помощь !

Ответить | Правка | ^ к родителю #4 | Наверх | Cообщить модератору

6. "TLS 1.3 для exim, dovecot под centos 7"  +/
Сообщение от int13h (ok), 11-Янв-19, 14:44 
>> Если хотите сделать мусорку, в которой поддерживается -- пересоберите exim.
> Мусорку - автоматически не получаемую обновлений безопасности наверное не хочу :(
> Эх, тогда ждать пару лет придётся :(
> Спасибо за помощь !

Ну, так у вас и так версия openssl уже не с репозитория.

Думаю, что если пересоберете exim ничего глобального не поменяется =)

Ответить | Правка | ^ к родителю #5 | Наверх | Cообщить модератору

8. "TLS 1.3 для exim, dovecot под centos 7"  +/
Сообщение от eRIC (ok), 11-Янв-19, 18:09 
> Если хотите сделать мусорку, в которой поддерживается -- пересоберите exim. Только правильно
> укажите размещение библиотек openssl

в век jails/zones/containers, постыдились бы ;)

в добавок, я вижу вы "шаблонист" и работаете исключительно по мануалу/туториалу/step by step/dummy и т.д. в *N?X издревле можно было самим собирать/кастомизировать свой софт со своими предпочтениями и следить за обновлениями не ждя пока это сделают вместо тебя разработчики операционной системы. слезайте с иглы готовых RPM/DEB пакетов :)

Ответить | Правка | ^ к родителю #4 | Наверх | Cообщить модератору

9. "TLS 1.3 для exim, dovecot под centos 7"  +/
Сообщение от suffix (ok), 10-Май-19, 18:23 
Спасибо. Так и сделал.

https://www.immuniweb.com/ssl/?id=WxGZsI4I

А+ и всё «зелёненькое» (PCI DSS, HIPAA, NIST, best-practices) :)

Ответить | Правка | ^ к родителю #4 | Наверх | Cообщить модератору

7. "TLS 1.3 для exim, dovecot под centos 7"  +/
Сообщение от Andrey Mitrofanov (?), 11-Янв-19, 14:47 
> Как реализовать ?
> С осени ищу мануалы, везде спрашиваю - в ответ тишина :(

https://bugzilla.redhat.com/1416715

" Ваш звонок очень важен, ждите, пжлст. "
   Или не.
//I am afraid there are no plans for such backport.//


#>> Мусорку - автоматически не получаемую обновлений безопасности

А обновлятели безопасности не хотят/не могут в v1.1.x, вроде.

Консенсус ентерпрайзус.

Ответить | Правка | ^ к родителю #0 | Наверх | Cообщить модератору

Архив | Удалить

Рекомендовать для помещения в FAQ | Индекс форумов | Темы | Пред. тема | След. тема




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру