Chinaunix

标题: 求助:Python SSL 连接postgresql [打印本页]

作者: 我不是老手    时间: 2011-07-31 15:45
标题: 求助:Python SSL 连接postgresql
在服务端按要求做好了server.key server.crt ;
在postgresql.conf中打开了SSL 选项;
在pg_hba.conf中设置了SSL登陆的账号:hostssl all all 192.168.0.2/32 md5;
用postgresql的命令行登陆显示是加密的了;
用psycopg2去连接数据库 conn = psycopg2.connect(database="testDB", user="testssl", host="192.168.0.1",port="5432",password="123456",sslmode="require")  是不是就可以使用SSL加密了??

请高手帮我看看我的理解是否正确????
作者: renxiao2003    时间: 2011-07-31 21:02
我没有用python连接过数据库。
作者: 653171341    时间: 2015-01-13 17:05
是阿!!!!!!




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2