diff options
Diffstat (limited to 'tests/tls-verify-peer/t')
-rw-r--r-- | tests/tls-verify-peer/t | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/tls-verify-peer/t b/tests/tls-verify-peer/t index 8326521..60bd042 100644 --- a/tests/tls-verify-peer/t +++ b/tests/tls-verify-peer/t @@ -1,8 +1,8 @@ -X509_SHA256="$(doveconf -c "$HOME_remote/.dovecot/config" -hx ssl_cert \ - | openssl x509 -noout -fingerprint -sha256 \ +ssl_server_cert_file="$(doveconf -c "$HOME_remote/.dovecot/config" -hx ssl_server/cert_file)" +X509_SHA256="$(openssl x509 -in "$ssl_server_cert_file" -noout -fingerprint -sha256 \ | sed -rn "/^.*=\\s*/ {s///p;q}" | tr -d : | tr "[A-Z]" "[a-z]")" -PKEY_SHA256="$(doveconf -c "$HOME_remote/.dovecot/config" -hx ssl_cert \ - | openssl x509 -pubkey | openssl pkey -pubin -outform DER \ +PKEY_SHA256="$(openssl x509 -in "$ssl_server_cert_file" -pubkey \ + | openssl pkey -in /dev/stdin -pubin -outform DER \ | openssl dgst -sha256 | sed -rn "/^.*=\\s*/ {s///p;q}")" unverified_peer() { @@ -116,7 +116,7 @@ if [ -d "/etc/ssl/certs" ]; then unverified_peer fi -c_rehash "$capath" +openssl rehash "$capath" # default host (localhost) is the CN (and also subjectAltName) with_remote_config <<<"SSL_CApath = $capath" @@ -146,4 +146,4 @@ done step_done -# vim: set filetype=sh : +# vim: set filetype=bash : |