Merge lp:~wiqd/kali/ssl-support into lp:kali

Proposed by Greg Armer
Status: Merged
Approved by: Tristan Seligmann
Approved revision: 119
Merged at revision: 117
Proposed branch: lp:~wiqd/kali/ssl-support
Merge into: lp:kali
To merge this branch: bzr merge lp:~wiqd/kali/ssl-support
Reviewer Review Type Date Requested Status
Tristan Seligmann Approve
Jeremy Thurgood Needs Fixing
Review via email: mp+2768@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Tristan Seligmann (mithrandi) wrote :

"from OpenSSL import SSL" seems to be pointless.

I'd suggest moving the "from twisted.internet import ssl" to the rest of the imports, using an idiom like

try:
    from twisted.internet import ssl
except ImportError:
    ssl = None

This will also require changing the name of the parameter, to avoid a name collision.

Finally, ServicesFactory can be instantiated outside of the conditional, avoiding a little code duplication.

review: Needs Fixing
Revision history for this message
Jeremy Thurgood (jerith) wrote :

SSL should be an optional config option. If it's missing, it should default to false. Also, what Tristan said about the imports.

review: Needs Fixing
lp:~wiqd/kali/ssl-support updated
118. By Greg Armer

Fixed review comments

Revision history for this message
Tristan Seligmann (mithrandi) wrote :

Instead of pulling "ssl" out of **params, it probably makes more sense to do "ssl=False" in the argument list.

Also, the code now always instantiates the TCPClient service, even if SSL is being used; this probably isn't so great, even though the service will never be hooked up.

review: Needs Fixing
lp:~wiqd/kali/ssl-support updated
119. By Greg Armer

Fixed review comments (hopefully)

Revision history for this message
Tristan Seligmann (mithrandi) wrote :

Okay, looks good to merge!

review: Approve

Subscribers

People subscribed via source and target branches

to all changes: