[CalendarServer-changes] [15710] CalendarServer/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Mon Jun 27 10:46:09 PDT 2016
Revision: 15710
http://trac.calendarserver.org//changeset/15710
Author: dre at apple.com
Date: 2016-06-27 10:46:09 -0700 (Mon, 27 Jun 2016)
Log Message:
-----------
Support SSL for postgres connections (via pg8000)
Modified Paths:
--------------
CalendarServer/trunk/conf/caldavd-stdconfig.plist
CalendarServer/trunk/twistedcaldav/stdconfig.py
CalendarServer/trunk/txdav/base/datastore/dbapiclient.py
Modified: CalendarServer/trunk/conf/caldavd-stdconfig.plist
===================================================================
--- CalendarServer/trunk/conf/caldavd-stdconfig.plist 2016-06-27 16:59:04 UTC (rev 15709)
+++ CalendarServer/trunk/conf/caldavd-stdconfig.plist 2016-06-27 17:46:09 UTC (rev 15710)
@@ -169,6 +169,10 @@
<!-- Password to use -->
<key>password</key>
<string></string>
+
+ <!-- Set to True to connect using SSL (pg8000 only). -->
+ <key>ssl</key>
+ <false/>
</dict>
<!-- Internally used by database to tell slave processes to inherit a file
Modified: CalendarServer/trunk/twistedcaldav/stdconfig.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/stdconfig.py 2016-06-27 16:59:04 UTC (rev 15709)
+++ CalendarServer/trunk/twistedcaldav/stdconfig.py 2016-06-27 17:46:09 UTC (rev 15710)
@@ -220,6 +220,7 @@
"database": "", # Name of database or Oracle SID
"user": "", # User name to connect as
"password": "", # Password to use
+ "ssl": False, # Set to True to connect using SSL (pg8000 only).
},
"DBAMPFD": 0, # Internally used by database to tell slave
Modified: CalendarServer/trunk/txdav/base/datastore/dbapiclient.py
===================================================================
--- CalendarServer/trunk/txdav/base/datastore/dbapiclient.py 2016-06-27 16:59:04 UTC (rev 15709)
+++ CalendarServer/trunk/txdav/base/datastore/dbapiclient.py 2016-06-27 17:46:09 UTC (rev 15710)
@@ -199,7 +199,7 @@
are then used to create the actual parameters for each module.
"""
- def __init__(self, endpoint=None, user=None, password=None, database=None, **kwargs):
+ def __init__(self, endpoint=None, user=None, password=None, database=None, ssl=False, **kwargs):
"""
@param endpoint: endpoint string describing the connection
@type endpoint: L{str}
@@ -228,6 +228,7 @@
self.user = user
self.password = password
self.database = database
+ self.ssl = ssl
@@ -305,6 +306,8 @@
"password": params.password,
"database": params.database,
}
+ if params.ssl:
+ dbkwargs["ssl"] = params.ssl
if params.unixsocket:
dbkwargs["unix_sock"] = params.unixsocket
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20160627/e4404140/attachment.html>
More information about the calendarserver-changes
mailing list