apple / ccs-calendarserver

The Calendar and Contacts Server.
https://www.calendarserver.org
Apache License 2.0
485 stars 136 forks source link

can't configure TLS transport to DB backend in 8.0 #405

Closed macosforgebot closed 8 years ago

macosforgebot commented 8 years ago

Axel.Rau@… originally submitted this as ticket:941


If I try this:

       <key>endpoint</key>
        <string>tls:db4.lrau.net</string>

I get:

  File "/usr/local/lib/python2.7/site-packages/txdav/base/datastore/dbapiclient.py", line 308, in _connectorFor_pg8000
    if params.unixsocket:
AttributeError: 'DBAPIParameters' object has no attribute 'unixsocket'

In dbapiclient.py, I see:

        if self.endpoint.startswith("unix:"):
        . . .
        elif self.endpoint.startswith("tcp:"):
        . . .
        self.user = user
macosforgebot commented 8 years ago

@dreness originally submitted this as comment:1:⁠ticket:941


Fixed! http://trac.calendarserver.org/changeset/15710/CalendarServer/trunk

SSL capability is already supported by pg8000, and Twisted doesn't need to do anything differently, which is why I opted for a separate ssl option instead of using an Endpoint with a tcps prefix.

Replying to Axel.Rau@…:

If I try this:

       <key>endpoint</key>
        <string>tls:db4.lrau.net</string>

I get:

  File "/usr/local/lib/python2.7/site-packages/txdav/base/datastore/dbapiclient.py", line 308, in _connectorFor_pg8000
    if params.unixsocket:
AttributeError: 'DBAPIParameters' object has no attribute 'unixsocket'

In dbapiclient.py, I see:

        if self.endpoint.startswith("unix:"):
        . . .
        elif self.endpoint.startswith("tcp:"):
        . . .
        self.user = user
macosforgebot commented 8 years ago

@ryandesign originally submitted this as comment:2:⁠ticket:941