Jean-Paul Calderone wrote:
No: use strports when you want to present strings of this form as a user-interface element, not otherwise.
Ok, but interesting. Why not otherwise? Do they have something bad about them?
To programatically configure an SSL server which requires a client certificate use something like this:
from twisted.internet import ssl, reactor reactor.listenSSL(4443, f, ssl.CertificateOptions())
This is in a .tac file but I get the idea.
Unlike the older ContextFactory classes, CertificateOptions has somewhat more modern requirements not dictated by HTTP. Specifically, the method is TLSv1 and certificates are required.
import twisted import twisted.internet.ssl ssl.CertificateOptions()
Traceback (most recent call last): File "<stdin>", line 1, in ? NameError: name 'ssl' is not defined
When was that added?
The only reason I was using strports was that the ContextFactory thing was a royal pain to do even the most basic SSL setup (like e.g. a server cert and key...). I'd be glad to ditch it.