Fedora & Debian & Ubuntu implement openssl differently.

In Ubuntu, as an Ubuntu-specific patch, we set default security level to
2, and prohibit protocols lower than TLSv1.2 / DTLSv1.2.

This is documented in the Ubuntu manpages for OpenSSL

http://manpages.ubuntu.com/manpages/hirsute/en/man3/SSL_CTX_set_security_level.3ssl.html

"""
The default security level can be configured when OpenSSL is compiled by 
setting -DOPENSSL_TLS_SECURITY_LEVEL=level. On Ubuntu, 2 is used.

Level 2
   Security level set to 112 bits of security. As a result RSA, DSA and DH keys 
shorter
   than 2048 bits and ECC keys shorter than 224 bits are prohibited.  In 
addition to the
   level 1 exclusions any cipher suite using RC4 is also prohibited. On Ubuntu, 
TLS
   versions below 1.2 are not permitted. Compression is disabled.
"""

This is the only way that we have able to configure minimum key sizes,
protocol versions for both TLS and DTLS without making any openssl cnf
changes, whilst remaining compatible with both openssl cnf from 1.0.2x,
1.1.0x and 1.1.1x series. As min/max API calls are not available across
all openssl series and software that allows to configure openssl
cipherstrings but not min/max versions.

If you need access to (D)TLS below 1.2  or weak cryptography you can use
openssl 1.1.1 API to set_security level to 1. Or you can set
CipherString to DEFAULT@SECLEVEL=1. Without modifying the software at
all, libssl can be configured via envrionment variables too.

I.e. exporting

export OPENSSL_CONF=`pwd`/openssl.cnf
cat openssl.cnf
openssl_conf = default_conf
[default_conf]
ssl_conf = ssl_sect
[ssl_sect]
system_default = system_default_sect
[system_default_sect]
CipherString = DEFAULT@SECLEVEL=1

Note that this openssl.cnf is compatible with _any_ openssl series.

In debian, they set min versions of TLS communication only, which breaks
with openssl 1.0.2x series as it fails to parse those settings. That was
unacceptable for Ubuntu.

I don't know how Fedora implements this, I guess I should take a look.

It would be nice for OpenSSL upstream to provide a standard configure
time option to set these things in a consistent manner, as at the moment
each distribution has to invent their own way of doing this. My
proposals to bump minimum protocol versions to TLSv1.2 in OpenSSL 3.0.0
for the time being got rejected, as it is deemed too soon.

In Ubuntu, we also configure GnuTLS with similar parameters, the
override mechanism there is different see https://discourse.ubuntu.com/t
/default-to-tls-v1-2-in-all-tls-libraries-in-20-04-lts/12464/8 for both
OpenSSL and GnuTLS details.

I'm not sure what is expected from this bug report. Ubuntu changes are
documented and publicized and are trivial to find. Were you expecting to
find this documentation somewhere else? Where did you look? I am happy
to add more documentation in more places, or change the implementation.

What does Fedora do? And is it portable to distributions that do not use
the crypto-policies package to maintain configs?

** Changed in: openssl (Ubuntu)
       Status: Confirmed => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to openssl in Ubuntu.
https://bugs.launchpad.net/bugs/1899878

Title:
  Python's test_ssl fails starting from Ubuntu 20.04

Status in openssl package in Ubuntu:
  Incomplete

Bug description:
  Please take a look at https://bugs.python.org/issue41561. Developers
  who work on Python think that the issue is due to a change in Ubuntu
  20.04 that is best described by
  https://bugs.python.org/issue41561#msg378089:

  "It sounds like a Debian/Ubuntu patch is breaking an assumption. Did
  somebody report the bug with Debian/Ubuntu maintainers of OpenSSL
  already? Fedora also configures OpenSSL with minimum protocol version
  of TLS 1.2. The distribution does it in a slightly different way that
  makes the restriction discoverable and that is compatible with
  Python's test suite."

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/1899878/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to