Mystery solved: Somebody (or something) placed a private key in a file
called privkey.pem and stored it in /etc/ssl/certs. This caused openssl
rehash to silently exit with error code 1, thus causing the whole
postinst script to fail.
After cleaning out the offending file, the package installed without any
problems.