第 四 章  使用SSL

内容一览

4.1 配置服务器
4.2 配置客户端
  4.2.1 使用不带证书的SSL
4.3 定制 SSLSocketFactory

4.1 配置服务器

     在主文档中有说到为SSL配置PostgreSQL? 服务器,所以这里不再重复。在从java中实现SSL连接服务器之前,确定你能用psql访问到它。创建完一个SSL应该能看到一下输出:

 
$ ./bin/psql -h localhost
Welcome to psql 8.0.0rc5, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
      \h for help with SQL commands
      \? for help with psql commands
      \g or terminate with semicolon to execute query
      \q to quit
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
jurka=#