2026-03-12 20:23:15

This commit is contained in:
root
2026-03-12 21:23:47 +01:00
parent eab4b36eca
commit 93039b8489
3332 changed files with 699614 additions and 0 deletions

8
vdh/get_certificate.sh Normal file
View File

@@ -0,0 +1,8 @@
#!/bin/bash
### get the ssl certificate send to the browser and store it in a file (for distribution)
### usage: first parameter is the hostname of the remote server, second is its port number and third is the output file
hostname=$1
port=$2
certfile=$3
echo -n | openssl s_client -connect ${hostname}:${port} | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ${certfile}