Skip to content

Commit 8bafeda

Browse files
committed
CA-407177: Fix swtpm's use of SHA1 on XS9
The default crypto policy in XS9 disables use of SHA1. However, swtpm needs to use it since it advertises SHA1 support to guests. On XS9, swtpm will ship with a custom openssl configuration file for this purpose so set the appropriate environment variable to use it if the file exists. Signed-off-by: Ross Lagerwall <[email protected]>
1 parent b050c78 commit 8bafeda

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ocaml/xenopsd/scripts/swtpm-wrapper

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# GNU Lesser General Public License for more details.
1414

1515
import os
16+
import os.path
1617
import stat
1718
import socket
1819
import sys
@@ -140,6 +141,8 @@ def main(argv):
140141

141142
tpm_env = dict(os.environ)
142143
tpm_env["LD_LIBRARY_PATH"] = "/usr/lib:"
144+
if os.path.exists("/etc/ssl/openssl-swtpm.cnf"):
145+
tpm_env["OPENSSL_CONF"] = "/etc/ssl/openssl-swtpm.cnf"
143146

144147
if needs_init or check_state_needs_init(tpm_state_file):
145148
if tpm_file is None:

0 commit comments

Comments
 (0)