Re: [Twisted-Python] SSLContext not valid for TLS Server

2017-08-28 Thread Cory Benfield
> On 27 Aug 2017, at 09:44, Thomas Hartwich wrote: > > = >> The most comprehensive fix here is to do some history spelunking in >> PyOpenSSL to find out what the lowest version is that has this code block[1] >> in it, and then only execute the current ecCurve logic if that code block >> does

Re: [Twisted-Python] SSLContext not valid for TLS Server

2017-08-25 Thread Cory Benfield
This is a somewhat-known issue that I’ve had bubbling on the backburner for some time. For a long time PyOpenSSL didn’t automatically load all EC curves and didn’t provide any API to do so, so Twisted told OpenSSL which curve to use. Some time ago PyOpenSSL changed this behaviour to automaticall

Re: [Twisted-Python] Is there a nice way to write transport-agnostic protocols and servers/clients?

2017-08-16 Thread Cory Benfield
> On 15 Aug 2017, at 01:22, Jarosław Fedewicz > wrote: > > The number of protocols that use TCP or UDP interchangeably is quite high. > Some applications where Twisted would be an appropriate choice, could even > work with non-TCP/UDP transports, like QUIC, DCCP, STCP, etc. Is it? TCP and

Re: [Twisted-Python] WebSockets and QUIC for Twisted

2017-07-06 Thread Cory Benfield
> On 5 Jul 2017, at 10:32, Barry Scott wrote: > > I am interested in using Twisted with a couple of technologies: WebSockets > and > QUIC. I'm researching what is already available. > > I found the autobahn-python for WebSockets, are there other projects that > provide WebSockets that I have

Re: [Twisted-Python] on adopting projects

2017-05-30 Thread Cory Benfield
> On 29 May 2017, at 20:25, Glyph wrote: > > Hyperlink is a bit of a weird case, in that its highly general nature meant > that a more general org (hyper) made more sense to adopt it, but we are in > the process of setting the project up and as I've discussed with Cory and > Mahmoud it will p

Re: [Twisted-Python] HTTP PUT a GET's streaming response with treq

2017-05-06 Thread Cory Benfield
> On 6 May 2017, at 20:09, Cory Benfield wrote: > > I consider this a bug in Twisted: I’ll open a ticket. This is now Twisted ticket #9132: https://twistedmatrix.com/trac/ticket/9132 <https://twistedmatrix.com/trac/ticket/9132> ___

Re: [Twisted-Python] HTTP PUT a GET's streaming response with treq

2017-05-06 Thread Cory Benfield
> On 5 May 2017, at 12:38, Phil Mayers wrote: > >> As a third note, your code does not handle the possibility that >> original._transport may not implement IPushProducer. While *in > > IIUC IResponse.deliverBody *does* guarantee (currently) to provide a > transport implementing IPushProducer t

Re: [Twisted-Python] HTTP PUT a GET's streaming response with treq

2017-05-05 Thread Cory Benfield
> On 5 May 2017, at 10:41, Nagy, Attila wrote: > > On 05/05/2017 10:26 AM, Phil Mayers wrote: >> On 04/05/17 16:30, Nagy, Attila wrote: >> >>> I would like to use the simplest (and correct of course) solution. >>> Juggling with buffering/data by hand seems even more risky to me. >> >> The prob

Re: [Twisted-Python] HTTP Agent persistent connections not closed for some HTTPS sites

2017-03-10 Thread Cory Benfield
> On 9 Mar 2017, at 22:01, Jean-Paul Calderone > wrote: > > Run the server with TLSMemoryBIOProtocol and use the transport's > pauseProducing method before you attempt the shutdown? > > Jean-Paul Yup, that will work. Similarly, having two TLSMemoryBIOProtocols communicating together and pau

Re: [Twisted-Python] HTTP Agent persistent connections not closed for some HTTPS sites

2017-03-07 Thread Cory Benfield
> On 6 Mar 2017, at 09:05, Adi Roiban wrote: > > I am not sure about which code are we talking here. > The specific HTTP11ClientProtocol which will fix only the HTTP client > part or the generic TLSMemoryBIOProtocol code which might fix any TLS > connection? I’m talking about the fact that call

Re: [Twisted-Python] HTTP Agent persistent connections not closed for some HTTPS sites

2017-03-06 Thread Cory Benfield
> On 5 Mar 2017, at 14:25, Tristan Seligmann wrote: > > On Sun, 5 Mar 2017 at 15:36 Adi Roiban > wrote: > I have observed this while running some end to end tests in which the > pool.closeCachedConnections() deferred was not called, even after a > generous amount of secon

Re: [Twisted-Python] twistedmatrix.com TLS certificate

2017-03-06 Thread Cory Benfield
> On 6 Mar 2017, at 07:22, Tristan Seligmann wrote: > > twistedmatrix.com 's current certificate is issued > by StartCom Certification Authority; for certificates issued by this CA prior > to 2016-09-21, the domain must be on a Chrome whitelist for it to be > accept

Re: [Twisted-Python] Python3 twistd daemon for Ubuntu 14.04 alternatives

2017-02-22 Thread Cory Benfield
> On 22 Feb 2017, at 18:16, Phil Mayers wrote: > > #2 seems useful now that I know about it but - correct me if I'm wrong - the > manylinux1 permitted C dependencies are super-tiny, and would not permit e.g. > cryptography or psycopg2? Depends. The permitted C dependencies *for dynamic linki

Re: [Twisted-Python] Streaming Requests

2017-01-09 Thread Cory Benfield
> On 8 Jan 2017, at 06:44, Mark Williams wrote: > > * Comments? > Will this approach break a public API? Does it sound terrible? Or > good? Please share your thoughts! > > Let's hope 2017 is the year of the streaming request! > > -Mark I’m very excited to see someone tackling this again:

Re: [Twisted-Python] treq POST abborting with: err: ('Could not adapt', '{"....", "..."} )

2017-01-07 Thread Cory Benfield
> On 7 Jan 2017, at 02:18, Tristan Seligmann wrote: > > On Sat, 7 Jan 2017 at 03:23 Glyph Lefkowitz wrote: > > Maybe we should support unicode for the body as well. We can set the charset > in the mime-type and everything so that it will be properly intelligible by > the server, which doesn

Re: [Twisted-Python] ITransport.write after IProtocol.connectionLost -- no failure/exception?

2016-12-16 Thread Cory Benfield
> On 15 Dec 2016, at 12:07, exvito here wrote: > > Dear all, > > The subject says most of it. While diagnosing a behavior on a somewhat > large codebase, I found out something somewhat surprising -- see > subject -- which is replicated with the minimal code example below. > > It is a LineRecei

Re: [Twisted-Python] notifyFinish not being called on Windows 10 Twisted 16.4.1

2016-10-17 Thread Cory Benfield
> On 17 Oct 2016, at 17:27, John Aherne wrote: > > OK. Thanks for the link. > > That explains what is going on although I'm not too clear on the details. > > What I was looking to do was set up an http session and when the browser went > away use that a the trigger to expire the session. > >

Re: [Twisted-Python] notifyFinish not being called on Windows 10 Twisted 16.4.1

2016-10-17 Thread Cory Benfield
> On 17 Oct 2016, at 08:46, John Aherne wrote: > > I have been running some tests to check some issue and have seen that > notifyFinish is not being called in 16.4.1 > > This is on Windows 10 using python 2.7.12 > > Checking back it is not called 16.3.0 but is in 16.2.0 > > The test uses so

Re: [Twisted-Python] gRPC support in Twisted Python

2016-10-12 Thread Cory Benfield
On this note, if anyone wanted to write a greenfield gRPC implementation for Twisted directly, rather than using the C++ library that Nathaniel has been working on, hyper-h2 and Twisted’s built-in HTTP/2 logic is likely to be a very useful leaping off point. My high-level understanding of gRPC i

Re: [Twisted-Python] Endpoint composition syntax

2016-09-07 Thread Cory Benfield
> On 7 Sep 2016, at 00:05, Glyph Lefkowitz wrote: > > >> On Sep 6, 2016, at 11:55 AM, Tristan Seligmann > > wrote: >> >> Currently there is no way to explicitly compose Twisted endpoints, but >> several endpoint implementations have arisen that explicitly wrap

Re: [Twisted-Python] Twisted Challenge Coins!

2016-09-05 Thread Cory Benfield
Let’s get this done. I’ll go up to $100 as well. Cory > On 3 Sep 2016, at 12:32, Hynek Schlawack wrote: > > Since this kind of fell to slumber: I'm upping my ante to $100 however many > coins that gives me. > > Sent from my phone. > > Am 20.06.2016 um 18:33 schrieb Kevin Horn

Re: [Twisted-Python] More tests running on Python 3

2016-08-11 Thread Cory Benfield
This is really excellent work! Cory > On 11 Aug 2016, at 13:42, Craig Rodrigues wrote: > > I looked at latest Travis builds on Linux: > > DATE BUILD > = > August 11, 2016 https://travis-ci.org/twisted/twisted/jobs/151440581 >

Re: [Twisted-Python] RFC: IPv6 multicast join/ticket 6597

2016-08-04 Thread Cory Benfield
> On 4 Aug 2016, at 17:03, Jason Litzinger wrote: > >> When you say *no* interfaces, do you mean actually no interfaces? As in, no >> loopback as well? > > I do not, sorry, that was poorly worded. The loopback interface was > up for all test runs, and all other interfaces on my machine (ether

Re: [Twisted-Python] RFC: IPv6 multicast join/ticket 6597

2016-08-04 Thread Cory Benfield
> On 4 Aug 2016, at 04:59, Jason Litzinger wrote: > Testing multicast is ... challenging. I barely have any idea how to set up a test environment for IPv4, and no idea what to do for IPv6. If you can speak to this in your tests (and hopefully docs as well) that would be

Re: [Twisted-Python] Request for help with Twisted bindings in M2Crypto

2016-07-25 Thread Cory Benfield
> On 25 Jul 2016, at 12:10, Daniel Sank wrote: > > I just randomly clicked through the docs to this: > https://twistedmatrix.com/documents/current/api/twisted._threads.IWorker.html > > > Note that: > > 1. It is a

Re: [Twisted-Python] Twisted 16.3.0 Prerelease 2 Announcement

2016-07-13 Thread Cory Benfield
> On 13 Jul 2016, at 10:00, Paweł Miech wrote: > > > Anyway, I’ll be spending my Twisted time on this for a while I suspect. > > This will delay HTTP/2 client support, unfortunately. =( > > Isn't it better to get HTTP2 client support and just document things better > for HTTP2? Or maybe even

Re: [Twisted-Python] Twisted 16.3.0 Prerelease 2 Announcement

2016-07-13 Thread Cory Benfield
> On 12 Jul 2016, at 22:04, Glyph Lefkowitz wrote: > > 2 years ago, to be precise: > > https://twistedmatrix.com/trac/ticket/6923 > > > Someone fixing this would be tremendously useful. > > -glyph I tried to get started on this yesterday. Unfortu

Re: [Twisted-Python] Twisted 16.3.0 Prerelease 2 Announcement

2016-07-12 Thread Cory Benfield
> On 12 Jul 2016, at 17:42, Paweł Miech wrote: > > > Agreed. I’m planning to begin the deprecation process, though it will take > > a little while as we need to remove all uses of it from within the Twisted > > codebase itself, as well as from the documentation. That turns out to be a > > big

Re: [Twisted-Python] Twisted 16.3.0 Prerelease 2 Announcement

2016-07-12 Thread Cory Benfield
> On 12 Jul 2016, at 09:33, Paweł Miech wrote: > > If you google for "ssl in twisted" you will also find articles that recommend > it. Since so many people use it, maybe it could be updated to be more secure? > If it does not make sense to update it then perhaps it would be good to > deprecat

Re: [Twisted-Python] Twisted 16.3.0 Prerelease 2 Announcement

2016-07-12 Thread Cory Benfield
> On 11 Jul 2016, at 20:22, Glyph Lefkowitz wrote: > > So pyOpenSSL/Cryptography doesn't have SSL_get_current_cipher anywhere? get_current_cipher isn’t helpful. In particular, it puts us in an awkward place where we have a connection that has been negotiated for HTTP/2, but we cannot use it.

Re: [Twisted-Python] Twisted 16.3.0 Prerelease 2 Announcement

2016-07-12 Thread Cory Benfield
> On 11 Jul 2016, at 22:04, Paweł Miech wrote: > > This seems to suggest that Ubuntu 16.04 (the system I'm testing) does not > support ciphers required by HTTP2. But nginx article about HTTP2 lists ubuntu > as only linux like system that is able to support HTTP2 over ALPN which is > required

Re: [Twisted-Python] Twisted 16.3.0 Prerelease 2 Announcement

2016-07-11 Thread Cory Benfield
> On 11 Jul 2016, at 01:45, Glyph Lefkowitz wrote: > > >> On Jul 9, 2016, at 10:30 AM, Paweł Miech > > wrote: >> >> My question is: should user deal with this kind of stuff themselves? If some >> ciphers are blacklisted in HTTP2 shouldn't this be handled somewhere i

Re: [Twisted-Python] Twisted 16.3.0 Prerelease 2 Announcement

2016-07-04 Thread Cory Benfield
Good catch Paweł. I have opened this issue as Twisted issue #8558: https://twistedmatrix.com/trac/ticket/8558 . I believe I know what the fix is and it’s fairly simple, so I’ll try to address this quickly and see if we can ship the fix in either the n

Re: [Twisted-Python] Buildbot upgrade to latest eight branch

2016-07-04 Thread Cory Benfield
> On 2 Jul 2016, at 23:42, Adi Roiban wrote: > > With this change, Buildbot should have a closer behavior to Travis-CI. That > is, it will automatically start the builders and will report the build > results in GitHub PR. I spotted this in action today before I’d read this list post, so I jus

[Twisted-Python] Improvements to Resource dispatch

2016-06-21 Thread Cory Benfield
All, Now that the HTTP/2 server changes have landed, one of the things I’d like to start dealing with is server Resource dispatch. Those of you who have been paying attention to this mailing list will remember that we discussed this a bit back when I was originally implementing HTTP/2 logic, an

Re: [Twisted-Python] web Resource question

2016-06-16 Thread Cory Benfield
> On 16 Jun 2016, at 05:16, Kevin Mcintyre wrote: > > > what is child.server = self.server in Resource.putChild? > > shouldn't it be child.server = self? I don’t think so. The reference to the server is presumably intended to refer to the Site object that is hosting the Resource. With that s

Re: [Twisted-Python] Twisted Challenge Coins!

2016-06-15 Thread Cory Benfield
> On 15 Jun 2016, at 09:24, Glyph wrote: > > You might be eligible to receive one, but first we need enough committers to > buy them in sufficient quantity that they can exist at all :). Heh, let’s assume I’m an idiot and didn’t extract that message from the original email. In that case, I’m

Re: [Twisted-Python] Twisted Challenge Coins!

2016-06-15 Thread Cory Benfield
> On 15 Jun 2016, at 02:44, Ashwini Oruganti wrote: > > So, if you are a Twisted contributor and would like to own a challenge coin, > please respond to this email. Also, do mention how many coins you would like, > and where you are located so that we can send you your coin(s). Well for obvio

Re: [Twisted-Python] web.client.readBody

2016-04-04 Thread Cory Benfield
> On 4 Apr 2016, at 09:32, John Aherne wrote: > > Cory > > Thanks for the detailed reply. > > I'll see what I can make of it. > > I must admit I don't see Google paying much attention to this. > > It does work if I use response.deliverBody, but I thought getting the > complete response in o

Re: [Twisted-Python] web.client.readBody

2016-04-04 Thread Cory Benfield
> On 3 Apr 2016, at 14:35, John Aherne wrote: > > I have been using deliverBody to process in responses but decided that > readBody might be a better fit. > > So far it works with http, but as soon as I switch to https it fails. > > I get a response http code 200 OK but no data. > > I've puz

Re: [Twisted-Python] Question for obtaining mac-address

2015-11-26 Thread Cory Benfield
> On 26 Nov 2015, at 13:29, Pavel Zverev wrote: > > Have nice day, developers! > > I am a beginner python developer, and recently I came across the Twisted > framework, I was interested in whether I get the MAC-address of the client > connected to the network, similar twisted.web.http.Request

Re: [Twisted-Python] Streaming HTTP

2015-11-23 Thread Cory Benfield
> On 19 Nov 2015, at 11:50, Cory Benfield wrote: > This seems super-gross but vaguely do-able, and we’ll need to write it in > order to get the new H2Connection/H2Stream objects working with the old > paradigm anyway. > > All of this approach sounds reasonable modulo som

Re: [Twisted-Python] Streaming HTTP

2015-11-19 Thread Cory Benfield
> On 18 Nov 2015, at 12:18, Glyph Lefkowitz wrote: > Sorry about the delay in responding to this, but I wanted to make sure I knew at least a bit about what I was talking about before I responded! >> What do people think of this approach? > > So I think you're roughly on the right track but

Re: [Twisted-Python] Streaming HTTP

2015-11-18 Thread Cory Benfield
> On 18 Nov 2015, at 12:30, Glyph Lefkowitz wrote: > > So the receiver sends explicit "unchoke" messages to increase the window, and > the "choke" message is implicit? Modulo some irrelevant distinctions, yes. Cory signature.asc Description: Message signed with OpenPGP using GPGMail __

Re: [Twisted-Python] Streaming HTTP

2015-11-18 Thread Cory Benfield
> On 18 Nov 2015, at 05:55, Glyph Lefkowitz wrote: > > Does HTTP2 have choke/unchoke notifications on individual streams? > Ultimately this does resolve to TCP backpressure, though… Not in such a binary form, no. The connection as a whole and each stream maintain independent flow control win

Re: [Twisted-Python] Streaming HTTP

2015-11-17 Thread Cory Benfield
> On 15 Nov 2015, at 10:18, Tobias Oberstein > wrote: > > How does flow-control work with the Go API? How does user code processing > chunks received unleash backpressure onto the sender? One caveat: I am not an expert in what Go is doing here, more a casual user. However, my understanding i

[Twisted-Python] Streaming HTTP

2015-11-13 Thread Cory Benfield
Folks, # Problem Statement Thanks for your feedback on my HTTP/2 questions. I’ve started work implementing a spike of a HTTP/2 protocol for twisted.web. I’m aiming to have something that works in at least some cases by the end of the day. As part of my dive into twisted.web, I noticed somethin

Re: [Twisted-Python] HTTP/2 and Twisted

2015-11-12 Thread Cory Benfield
> On 12 Nov 2015, at 06:04, Glyph Lefkowitz wrote: > Creating this dependency loop (twisted->txh2->(twisted->txh2->..., h2)) seems > potentially problematic, and maybe more trouble than it's worth in terms of > factoring things out. An IProtocol implementation is literally three methods > - m

[Twisted-Python] HTTP/2 and Twisted

2015-11-09 Thread Cory Benfield
All, With the work on #7860 nearly done, Twisted should be in a good place to have a HTTP/2 implementation. There’s currently a Trac ticket (#7460) for adding HTTP/2 support to twisted.web, which is obviously a good idea. I’m happy to take on that work. What I want to get a picture for is how

Re: [Twisted-Python] Blacklisting hosts

2015-08-09 Thread Cory Benfield
> On 8 Aug 2015, at 08:07, Chris Norman wrote: > > Hi all, > I am using Twisted to make a game server. I want to be able to ban IP > addresses. Currently I check if the host is in a blacklist, and if it is, > call abortConnection on the transport. It works fine, but I'm thinking there > shoul