Skip to content

Commit f3762e8

Browse files
committed
Manually merge PR97 to address minor openssl certificate fingerprint format change.
git-svn-id: svn+ssh://svn.code.sf.net/p/migrid/code/trunk@6105 b75ad72c-e7d7-11dd-a971-7dbc132099af
1 parent 188ddf9 commit f3762e8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mig/shared/install.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1924,8 +1924,9 @@ def _generate_confs_prepare(
19241924
openssl_proc = subprocess_popen(
19251925
openssl_cmd, stdout=subprocess_pipe)
19261926
raw_sha256 = openssl_proc.stdout.read().strip()
1927-
daemon_keycert_sha256 = raw_sha256.replace("SHA256 Fingerprint=",
1928-
"")
1927+
# NOTE: openssl outputs something like 'SHA256 Fingerprint=BLA'
1928+
# but algo part case may vary - split and take last part.
1929+
daemon_keycert_sha256 = raw_sha256.split(" Fingerprint=", 1)[-1]
19291930
except Exception as exc:
19301931
print("ERROR: failed to extract sha256 fingerprint of %s: %s" %
19311932
(key_path, exc))

0 commit comments

Comments
 (0)