Description of problem:
spice-server in RHEL as of now lacks ECDH support because openssl 1.0.2 in RHEL doesn't set up ECDH stuff by default and isn't likely to gain that support (unlike more recent 1.1.0). A single call of:
in the same section of code where server cert & key are set is enough to make ECDHE_* cipher suites and thus Perfect Forward Secrecy work without further configuration (unlike standard Diffie-Hellman that needs pre-generated keys).
Given that the ECDH stuff is set automatically from openssl 1.1.0 (also ), this change is necessary just in el7, not in upstream (openssl 1.1.0 is almost two years old so regular distributions have had enough time to pick it and gain ECDH/PFS support automatically).
Version-Release number of selected component (if applicable):
RHEL 7.5 / spice-server-0.14.0-2.el7
Steps to Reproduce:
/usr/libexec/qemu-kvm -monitor stdio -vga qxl -spice tls-port=5800,password=123,x509-dir=/etc/pki/libvirt-spice,tls-ciphers=$(openssl ciphers 'ECDHE:!eNULL:!aNULL')
2. client: remote-viewer [--spice-ca-file FILE] spice://HOST_OR_IP/?tls-port=5800
no cipher overlap (shown in server output)
Test case alternative:
step 1: don't change default cipher suites on qemu CLI
step 3: run Wireshark (with capture filter: 'tcp port 5800' and then if you don't see TLS-marked packets, right-click one, choose Decode as → SSL, look into Server Hello message)
actual result: cipher suite without ECDH is used
expected result: cihper suite with ECDH is used
I sent https://lists.freedesktop.org/archives/spice-devel/2018-June/044184.html upstream which is implementing your suggestion.
NB: for cipher-related testing, I find https://nmap.org/nsedoc/scripts/ssl-enum-ciphers.html very useful.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.