From 51c66dde947f67e633e2cc9d7d61b6868edf95cd Mon Sep 17 00:00:00 2001 From: ljf Date: Sun, 20 Sep 2020 20:59:38 +0200 Subject: [PATCH] [enh] Add x509 fingerprint in /etc/issue --- bin/yunoprompt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/yunoprompt b/bin/yunoprompt index 09400639b..252e5a1a4 100755 --- a/bin/yunoprompt +++ b/bin/yunoprompt @@ -1,5 +1,9 @@ #!/bin/bash +# Fetch x509 fingerprint +x509_fingerprint=$(openssl x509 -in /etc/yunohost/certs/yunohost.org/crt.pem -noout -fingerprint -sha256 | cut -d= -f2) + + # Fetch SSH fingerprints i=0 for key in $(ls /etc/ssh/ssh_host_{ed25519,rsa,ecdsa}_key.pub 2> /dev/null) ; do @@ -40,6 +44,7 @@ LOGO_AND_FINGERPRINTS=$(cat << EOF $LOGO IP: ${local_ip} + X509 fingerprint: ${x509_fingerprint} SSH fingerprints: ${fingerprint[0]} ${fingerprint[1]}