Blame SOURCES/0031-input-xen-cover-RHEL9-OpenSSL-crypto-settings.patch

696189
From 9e1c78a4dda8e8f504fd8f01d7ff5a02e6d3b8ff Mon Sep 17 00:00:00 2001
696189
From: Laszlo Ersek <lersek@redhat.com>
696189
Date: Fri, 29 Jul 2022 12:57:03 +0200
696189
Subject: [PATCH] input-xen: cover RHEL9 OpenSSL crypto settings
696189
696189
In [master] commit af4a0454cdd2 ("input-xen: replace "enable LEGACY
696189
crypto" advice with targeted ssh options", 2022-07-11), we documented how
696189
the libssh / openssh crypto settings needed to be relaxed, for connecting
696189
to RHEL5 sshd. [rhel-9.1 commit: 3f7f730ac9cb.]
696189
696189
It turns out that in RHEL9, the non-LEGACY crypto policies disable SHA1 in
696189
signature algorithms even at the OpenSSL level. Explain how the user can
696189
re-enable that separately, for individual virt-v2v invocations.
696189
696189
The method depends on Rich's libvirt commit 45912ac399ab ("rpc: Pass
696189
OPENSSL_CONF through to ssh invocations", 2022-07-25), which is is going
696189
to be released in upstream libvirt v8.6.0.
696189
696189
Thanks: Dmitry Belyavskiy & Rich Jones
696189
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2062360
696189
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
696189
Message-Id: <20220729105703.10150-1-lersek@redhat.com>
696189
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
696189
(cherry picked from commit ddab06d5eb99696f5fd1073b8ec91efbc8c3e4ab)
696189
---
696189
 docs/virt-v2v-input-xen.pod | 20 ++++++++++++++++++++
696189
 1 file changed, 20 insertions(+)
696189
696189
diff --git a/docs/virt-v2v-input-xen.pod b/docs/virt-v2v-input-xen.pod
696189
index 1775fc31..9c3981e1 100644
696189
--- a/docs/virt-v2v-input-xen.pod
696189
+++ b/docs/virt-v2v-input-xen.pod
696189
@@ -54,6 +54,26 @@ new one. Virt-v2v uses both C<libssh> and C<ssh> when converting a guest
696189
 from Xen, and on some operating systems, C<libssh> and C<ssh> may not
696189
 both accept the same option variant.)
696189
 
696189
+When connecting to RHEL 5 sshd from RHEL 9, the SHA1 algorithm's use in
696189
+signatures has to be re-enabled at the OpenSSL level, in addition to the
696189
+above SSH configuration.  Create a file called F<$HOME/openssl-sha1.cnf>
696189
+with the following contents:
696189
+
696189
+ .include /etc/ssl/openssl.cnf
696189
+ [openssl_init]
696189
+ alg_section = evp_properties
696189
+ [evp_properties]
696189
+ rh-allow-sha1-signatures = yes
696189
+
696189
+and export the following variable into the environment of the
696189
+C<virt-v2v> process:
696189
+
696189
+ OPENSSL_CONF=$HOME/openssl-sha1.cnf
696189
+
696189
+Note that the C<OPENSSL_CONF> environment variable will only take effect
696189
+if the libvirt client library used by virt-v2v is at least version
696189
+8.6.0.
696189
+
696189
 =head2 Test libvirt connection to remote Xen host
696189
 
696189
 Use the L<virsh(1)> command to list the guests on the remote Xen host: