我想使用OpenSSL从我的XP客户端使用SSL连接到我的Postgres 8.3数据库。 这工作正常,没有SSL。 当我尝试使用SSL(无客户端证书),我得到的错误:
error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure
我遵循Postgres手册中关于SSL的说明,包括创build一个自签名证书。 在我的pg_hba.conf中有一行:
host dbname loginname 123.45.67.89/32 md5
服务器上的OpenSSL版本是0.9.8g,客户端版本是0.9.8j。 我会很感激任何追踪问题的build议。
编辑:
来自postgresql.conf的未注释的行是:
data_directory = '/var/ebs0/postgres/main' hba_file = '/etc/postgresql/8.3/main/pg_hba.conf' ident_file = '/etc/postgresql/8.3/main/pg_ident.conf' external_pid_file = '/var/run/postgresql/8.3-main.pid' listen_addresses = '*' port = 5432 max_connections = 100 unix_socket_directory = '/var/run/postgresql' ssl = true shared_buffers = 24MB
我的猜测是,你正在试图对一个不期待它的连接说话。 您可以尝试使用hostssl而不是主机,但是显示您的postgresql.conf文件(应该有您的SSLconfiguration选项)对您更有用。