Cause: For SSL connections, we considered the connection to be successful if the certificate subject matched the hostname even if a user-specified host certificate subject was given that didn't match.
Consequence: Remote-viewer connected to the remote host even if the user-specified certificate subject did not match.
Fix: Make the user-specified certificate subject check have priority over the hostname check.
Result: Connections fail if user-specified cert subject doesn't match.
Description of problem:
if CN matches hostname/IP but not explicitly set host subject, the connection should fail.
The reason is that externally-provided host subject is likely to be more trustworthy than just check for host/ip == CN equivalence. OpenVPN behaves the suggested way for instance.
Version-Release number of selected component (if applicable):
windows builds affected too
Steps to Reproduce:
1. have a server with 'CN=server.example.org' in its subject
2. connect to a server:
remote-viewer --spice-ca-file=file --spice-host-subject='CN=something-else' spice://server.example.org/?tls-port=sport
r-v should print host-subject mismatch error and exit
I've sent a potential patch for this to http://lists.freedesktop.org/archives/spice-devel/2013-September/014612.html .
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.