diff options
Diffstat (limited to 'tests/tls-rsa+ecdsa')
-rw-r--r-- | tests/tls-rsa+ecdsa/remote.conf | 4 | ||||
-rw-r--r-- | tests/tls-rsa+ecdsa/t | 17 |
2 files changed, 12 insertions, 9 deletions
diff --git a/tests/tls-rsa+ecdsa/remote.conf b/tests/tls-rsa+ecdsa/remote.conf index 72ca135..c0f2ff3 100644 --- a/tests/tls-rsa+ecdsa/remote.conf +++ b/tests/tls-rsa+ecdsa/remote.conf @@ -1,5 +1,5 @@ !include conf.d/imapd.conf !include conf.d/ssl.conf -ssl_alt_cert = <conf.d/dovecot.ecdsa.crt -ssl_alt_key = <conf.d/dovecot.ecdsa.key +ssl_server_alt_cert_file = conf.d/dovecot.ecdsa.crt +ssl_server_alt_key_file = conf.d/dovecot.ecdsa.key diff --git a/tests/tls-rsa+ecdsa/t b/tests/tls-rsa+ecdsa/t index 605d7b6..789d9e6 100644 --- a/tests/tls-rsa+ecdsa/t +++ b/tests/tls-rsa+ecdsa/t @@ -1,19 +1,22 @@ doveconf_remote() { - doveconf -c "$HOME_remote/.dovecot/config" -hx "$1" + local p k="$1" + p="$(doveconf -c "$HOME_remote/.dovecot/config" -hx "$1")" + cat <"$p" } pkey_sha256() { - openssl x509 -pubkey | openssl pkey -pubin -outform DER \ + openssl x509 -in /dev/stdin -pubkey \ + | openssl pkey -in /dev/stdin -pubin -outform DER \ | openssl dgst -sha256 | sed -rn "/^.*=\\s*/ {s///p;q}" } x509_sha256() { - openssl x509 -noout -fingerprint -sha256 \ + openssl x509 -in /dev/stdin -noout -fingerprint -sha256 \ | sed -rn "/^.*=\\s*/ {s///p;q}" | tr -d : | tr "[A-Z]" "[a-z]" } -PKEY_SHA256="$(doveconf_remote ssl_cert | pkey_sha256)" -X509_SHA256="$(doveconf_remote ssl_cert | x509_sha256)" -PKEY_ALT_SHA256="$(doveconf_remote ssl_alt_cert | pkey_sha256)" -X509_ALT_SHA256="$(doveconf_remote ssl_alt_cert | x509_sha256)" +PKEY_SHA256="$(doveconf_remote ssl_server/cert_file | pkey_sha256)" +X509_SHA256="$(doveconf_remote ssl_server/cert_file | x509_sha256)" +PKEY_ALT_SHA256="$(doveconf_remote ssl_server/alt_cert_file | pkey_sha256)" +X509_ALT_SHA256="$(doveconf_remote ssl_server/alt_cert_file | x509_sha256)" # pinned valid fingerprints cat >>"$XDG_CONFIG_HOME/interimap/config" <<-EOF |