- PostgreSQL 9.4.6
- OpenSSL 1.0.2f
If my server or client certificate use SHA256, I get the following error on the client:
psql: SSL error: tlsv1 alert decrypt error
And the following log message on the server:
LOG: could not accept SSL connection: unknown message digest algorithm
If I generate the client key with SHA1, it works fine:
openssl x509 -req -in user.csr -CA root.crt -CAkey server.key -out user.crt -CAcreateserial -days 365 -sha1
How can I get it to work with SHA256?
unknown message digest algorithm
is written by ssl lib.pg_hba.conf
it works fine.SSLerrmessage
(line 958) creates that message by calling the openssl's functionERR_reason_error_string
. Therefore postgres only returns the openssl's error message. On the other words, (i think) the problem has occured on the openssl layer.