Re: [Twisted-Python] "mind" introduced strangely in pb howto

2013-10-24 Thread Hynek Schlawack
Am 24.10.2013 um 09:02 schrieb Tobias Oberstein :

>> I just tried to register so I could do that. When I clicked on the register 
>> button
>> after filling out the username/password fields my browser (firefox) brought
>> up a notice that the security certificate is invalid because of unavailable
>> issuance chain information. Knowing absolutely nothing about internet
>> security issues I thought I should mention this and ask if this is expected
>> behavior.
> 
> I wouldn't call that expected behavior, since
> 
> a) the certificate used on twistedmatrix.com contains (as it should) 
> intermediate CA certs also (see attachments)

I’m not sure what you mean with “contains”? It certainly *relies* on one but 
unfortunately doesn’t send it along (yet):

$ openssl s_client -host www.twistedmatrix.com -port 443



 
CONNECTED(0003)
depth=0 
/description=S7lbCt7N2R4t9o8J/C=US/CN=www.twistedmatrix.com/emailAddress=postmas...@twistedmatrix.com
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 
/description=S7lbCt7N2R4t9o8J/C=US/CN=www.twistedmatrix.com/emailAddress=postmas...@twistedmatrix.com
verify error:num=27:certificate not trusted
verify return:1
depth=0 
/description=S7lbCt7N2R4t9o8J/C=US/CN=www.twistedmatrix.com/emailAddress=postmas...@twistedmatrix.com
verify error:num=21:unable to verify the first certificate
verify return:1
---
Certificate chain
 0 
s:/description=S7lbCt7N2R4t9o8J/C=US/CN=www.twistedmatrix.com/emailAddress=postmas...@twistedmatrix.com
   i:/C=IL/O=StartCom Ltd./OU=Secure Digital Certificate Signing/CN=StartCom 
Class 1 Primary Intermediate Server CA
---


signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] "mind" introduced strangely in pb howto

2013-10-24 Thread Hynek Schlawack
Am 24.10.2013 um 08:08 schrieb Daniel Sank :

> When I clicked on the
> register button after filling out the username/password fields my
> browser (firefox) brought up a notice that the security certificate is
> invalid because of unavailable issuance chain information. Knowing
> absolutely nothing about internet security issues I thought I should
> mention this and ask if this is expected behavior.

This will be fixed as soon as the now-in-prerelease Twisted 13.2 has been 
deployed to Twisted’s homepage (i.e. hopefully soon). Earlier versions don’t 
allow the specification of chain certificates unfortunately so it’s up to the 
browsers to fetch them – or not.


signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] "mind" introduced strangely in pb howto

2013-10-24 Thread Tobias Oberstein
Ah, right. Seems Chrome changed it's behavior .. at one point it wasn't able to 
load intermediate certs .. and hence I assumed from the dialog that Twisted 
cert has the intermediate cert contained. Wrong.

FWIW, you can manually concatenate certs .. this is what we do (also for 
StartSSL):

$ cat myserver_plain_cert.crt > myserver.crt
$ cat ../sub.class1.server.sha2.ca.pem >> myserver.crt
$ cat ../ca.pem >> myserver.crt

A concatenated cert like above works today without the new code that is 
upcoming in Twisted. Which is cool also.

However: this all does not explain (at least I dont understand) why the OP has 
that issue showing up .. Firefox is able to load intermediate CA certs from the 
net .. I have seen it .. also for StartSSL certs. Something is breaking this. 
Maybe it's MITM TLS, maybe they blocked intermediate cert auto-loading, .. 
dunno.

/Tobias

> -Ursprüngliche Nachricht-
> Von: twisted-python-boun...@twistedmatrix.com [mailto:twisted-python-
> boun...@twistedmatrix.com] Im Auftrag von Hynek Schlawack
> Gesendet: Donnerstag, 24. Oktober 2013 09:16
> An: Twisted general discussion
> Betreff: Re: [Twisted-Python] "mind" introduced strangely in pb howto
> 
> Am 24.10.2013 um 09:02 schrieb Tobias Oberstein
> :
> 
> >> I just tried to register so I could do that. When I clicked on the
> >> register button after filling out the username/password fields my
> >> browser (firefox) brought up a notice that the security certificate
> >> is invalid because of unavailable issuance chain information. Knowing
> >> absolutely nothing about internet security issues I thought I should
> >> mention this and ask if this is expected behavior.
> >
> > I wouldn't call that expected behavior, since
> >
> > a) the certificate used on twistedmatrix.com contains (as it should)
> > intermediate CA certs also (see attachments)
> 
> I'm not sure what you mean with "contains"? It certainly *relies* on one but
> unfortunately doesn't send it along (yet):
> 
> $ openssl s_client -host www.twistedmatrix.com -port 443
> CONNECTED(0003)
> depth=0
> /description=S7lbCt7N2R4t9o8J/C=US/CN=www.twistedmatrix.com/emailAd
> dress=postmas...@twistedmatrix.com
> verify error:num=20:unable to get local issuer certificate verify return:1
> depth=0
> /description=S7lbCt7N2R4t9o8J/C=US/CN=www.twistedmatrix.com/emailAd
> dress=postmas...@twistedmatrix.com
> verify error:num=27:certificate not trusted verify return:1
> depth=0
> /description=S7lbCt7N2R4t9o8J/C=US/CN=www.twistedmatrix.com/emailAd
> dress=postmas...@twistedmatrix.com
> verify error:num=21:unable to verify the first certificate verify return:1
> ---
> Certificate chain
>  0
> s:/description=S7lbCt7N2R4t9o8J/C=US/CN=www.twistedmatrix.com/email
> Address=postmas...@twistedmatrix.com
>i:/C=IL/O=StartCom Ltd./OU=Secure Digital Certificate
> Signing/CN=StartCom Class 1 Primary Intermediate Server CA
> ---

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] "mind" introduced strangely in pb howto

2013-10-24 Thread Hynek Schlawack
Am 24.10.2013 um 09:48 schrieb Tobias Oberstein :

> FWIW, you can manually concatenate certs .. this is what we do (also for 
> StartSSL):
> 
>$ cat myserver_plain_cert.crt > myserver.crt
>$ cat ../sub.class1.server.sha2.ca.pem >> myserver.crt
>$ cat ../ca.pem >> myserver.crt
> 
> A concatenated cert like above works today without the new code that is 
> upcoming in Twisted. Which is cool also.

That is completely new to me. Are you sure you’re not mixing up Twisted’s 
behavior with nginx?

If what you say is true, there would have never been the need for #2061 and the 
monkey patching everyone was doing before it landed. Can you point me at a 
server where you have deployed TLS like that please?


signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] "mind" introduced strangely in pb howto

2013-10-24 Thread Tobias Oberstein
> > A concatenated cert like above works today without the new code that is
> upcoming in Twisted. Which is cool also.
> 
> That is completely new to me. Are you sure you're not mixing up Twisted's
> behavior with nginx?
> 
> If what you say is true, there would have never been the need for #2061 and
> the monkey patching everyone was doing before it landed. Can you point me
> at a server where you have deployed TLS like that please?

https://crossbardemo.tavendo.de/ws

This works for me in Chrome, FF and IE. It is Twisted Web / Autobahn. Nothing 
in front.

Now, using 

openssl s_client -host crossbardemo.tavendo.de -port 443



 

spits out errors complaining about "self-signed" cert inside.

This might be because I not only included the StartSSL intermediate CA cert, 
but also their top-level CA cert (which is obviously self-signed).

Maybe this is wrong, and one should only include up to (but excluding) root CA 
cert ..

/Tobias

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] epoll keep sharing state between process even after fork.

2013-10-24 Thread Flint
>
> On 03:46 pm, grindi...@gmail.com wrote:
> >Hi everybody
> >
> >I a came across a surprising problem when using the epoll based
> >reactor.
> >(ticket here https://twistedmatrix.com/trac/ticket/6796)
> >
> >As you can see on the ticket, the epoll object seems to share some
> >state
> >even after fork.
> >
> >[snip]
> >
> >- Using spawnProcess as mentioned in the ticket comment, is not an
> >option
> >too, in my case, I need to share some state between the main process
> >and
> >subprocess. (I have on object in main process space that I want to
> >inherit
> >in all subprocess)
>
> This doesn't really explain why you can't use `spawnProcess`.  There are
> other ways to share state between processes.  Perhaps if you describe
> the object you have someone can suggest a way to share it that will
> still satisfy your requirements without requiring that you use the
> `multiprocessing` module.
>
> Jean-Paul
>

Hi.

For the moment I share a factory object, but it's the underlying "protocol
class" that is really needed.
The code takes a factory object, and then launch a set of worker/process.
when a connection is made on the parent process, the socket handler will be
sent to one of the process (using sendmsg), the process will then run
reactor.adoptStreamConnection and this is when we need the protocol class.
There is an example of what I would like to achieve here
https://github.com/Grindizer/scaletix the example works with select or poll
reactor.

with spawnProcess I guess the child process will need to somehow import the
factory class and should be given the way to instanciate it ? isn't it ? I
don't know other way to do it actually ?

thankx again.
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] epoll keep sharing state between process even after fork.

2013-10-24 Thread Flint
> >   2. Arrange for the epoll object (or FD) to be closed after fork, but
> > before exec, so that the child process can't fiddle with it
>
> See also:
>
> http://bugs.python.org/issue8713
>
> ...which suggests Python 3.4 added fork+exec support to multiprocessing.
> On Unix and older Python versions, you're stuck with plain fork and all
> the attendant horribleness.
>
> This is a multiprocessing bug IMHO.
>

Hi again,

I've found this discussion https://lkml.org/lkml/2007/10/27/25 the
scenarios discussed are a bit different but it sounds to me related to the
same problem. which makes me think this is not a python bug but may be an
epoll design poblem with fork !
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] "mind" introduced strangely in pb howto

2013-10-24 Thread Hynek Schlawack

Am 24.10.2013 um 11:10 schrieb Tobias Oberstein :

>>> A concatenated cert like above works today without the new code that is
>> upcoming in Twisted. Which is cool also.
>> 
>> That is completely new to me. Are you sure you're not mixing up Twisted's
>> behavior with nginx?
>> 
>> If what you say is true, there would have never been the need for #2061 and
>> the monkey patching everyone was doing before it landed. Can you point me
>> at a server where you have deployed TLS like that please?
> 
> https://crossbardemo.tavendo.de/ws
> 
> This works for me in Chrome, FF and IE. It is Twisted Web / Autobahn. Nothing 
> in front.

Your server definitely sends three certificates – that’s surprising/confusing.

Could you double-check how you’ve achieved that? If you google for chain certs 
& Twisted you’ll find all kinds of monkey patches to achieve that; and when I 
run twistd -n web with a pem that has multiple certificates I still get sent 
only one from the server. I feel like I’m missing something.


signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] "mind" introduced strangely in pb howto

2013-10-24 Thread Tobias Oberstein
> Your server definitely sends three certificates - that's surprising/confusing.
> 
> Could you double-check how you've achieved that? If you google for chain
> certs & Twisted you'll find all kinds of monkey patches to achieve that; and
> when I run twistd -n web with a pem that has multiple certificates I still get
> sent only one from the server. I feel like I'm missing something.

Ok, sorry, I forgot totally about it .. but this is what we do:

https://github.com/crossbario/crossbar/blob/master/crossbar/crossbar/tlsctx.py#L73

It indeed relies on "use_certificate_chain_file".

Sorry. My fault: it needs patching.

/Tobias

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] "mind" introduced strangely in pb howto

2013-10-24 Thread Hynek Schlawack

Am 24.10.2013 um 12:44 schrieb Tobias Oberstein :

>> Your server definitely sends three certificates - that's 
>> surprising/confusing.
>> 
>> Could you double-check how you've achieved that? If you google for chain
>> certs & Twisted you'll find all kinds of monkey patches to achieve that; and
>> when I run twistd -n web with a pem that has multiple certificates I still 
>> get
>> sent only one from the server. I feel like I'm missing something.
> 
> Ok, sorry, I forgot totally about it .. but this is what we do:
> 
> https://github.com/crossbario/crossbar/blob/master/crossbar/crossbar/tlsctx.py#L73
> 
> It indeed relies on "use_certificate_chain_file".
> 
> Sorry. My fault: it needs patching.

Phew, you really got me sweating there. :)

Since you’re not using string representations there, you can move to 
CertificateOptions which has chain files sind 13.1 already (the string support 
slipped into 13.2 because I don’t know how to Python and it got reverted a few 
days before the release of 13.1 because of a Python 3 regression).


signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] epoll keep sharing state between process even after fork.

2013-10-24 Thread Itamar Turner-Trauring

On 10/23/2013 12:50 PM, Phil Mayers wrote:


This is a multiprocessing bug IMHO.


This issue with multiprocessing appears in other places too. E.g. if 
you're using stdlib logging, child processes will try to rotate the 
parent process logs.


Basically multiprocessing on Unix is utterly broken and should never be 
used (except in the fork+exec form in Python 3.4).


-Itamar

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] epoll keep sharing state between process even after fork.

2013-10-24 Thread exarkun

On 11:19 am, ita...@itamarst.org wrote:

On 10/23/2013 12:50 PM, Phil Mayers wrote:


This is a multiprocessing bug IMHO.


This issue with multiprocessing appears in other places too. E.g. if 
you're using stdlib logging, child processes will try to rotate the 
parent process logs.


Basically multiprocessing on Unix is utterly broken and should never be 
used (except in the fork+exec form in Python 3.4).


To expand on that just a bit, the form of sharing that you get when you 
fork() but you don't exec() is very difficult to use correctly (I think 
it's an open question whether it's *possible* to use correctly in a 
Python program).


The argument here is similar to the argument against shared-everything 
multithreading.  While memory (and some other per-process state) is no 
longer shared after fork(), *some* per-process state is still shared. 
And all of the state that isn't shared is still a potential source of 
bugs since it's almost certainly the case that none of it cooperated 
with the fork() call - a call which happened at some arbitrary time and 
captured a snapshot of all the state in memory at an arbitrary point.


Consider a simple implementation of a lock file, used to prevent 
multiple instances of a program from starting.  There are several ways 
fork() could break such code.  Perhaps it is partway through acquiring a 
lock on the lock file when the fork() occurs.  Perhaps the result is 
that the file ends up locked but no process thinks it is holding the 
lock.  Now no instances of the program are running.  Or perhaps the lock 
is held when fork() happens and the problem only surfaces at unlock 
time.  Perhaps one of the processes exits and releases the lock.  Now 
the program is still running but the lock isn't held.


And that's just one of the simplest possible examples of how things can 
go wrong.


The nearly uncountable different ways for failures to creep in and the 
resulting impracticality (if not impossibility) of being able to test 
that Twisted (or any Python library) actually works when fork() is used 
means that it's not likely Twisted will ever be declared compatible with 
any fork()-without-exec() usage.


You can find some examples of Twisted-using applications that run 
multiple processes, though.  Apple CalendarServer does it by passing 
file descriptors to worker processes and sends them the location of a 
configuration file describing how they should behave.  Divmod Mantissa 
does it by inserting self-describing work into a SQLite3 database.  When 
the worker process finds one of these, it knows what code to load and 
run by looking at the fields in the row.  These are variations on a 
theme - RPC, not shared (or duplicated) memory.


Hope this helps,
Jean-Paul

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


[Twisted-Python] WG: "mind" introduced strangely in pb howto

2013-10-24 Thread Tobias Oberstein
maybe the mailing list disallows >2 attachments .. again:

http://picpaste.com/pics/step1-NB1LoEVR.1382620207.png
http://picpaste.com/pics/step2-6zVhXeE6.1382620274.png
http://picpaste.com/pics/step3-KTao4B2V.1382620308.png


-Ursprüngliche Nachricht-
Von: Tobias Oberstein 
Gesendet: Donnerstag, 24. Oktober 2013 14:35
An: Twisted general discussion
Betreff: AW: [Twisted-Python] "mind" introduced strangely in pb howto

Daniel,

Ok, I've just tried using Firefox Portable (a self-contained browser not 
relying on any local installed stuff .. you can run that without Admin rights / 
installation - caution: when you are on some intranet, the former might be 
technically possible, but still disallowed .. and admins might still catch 
you): http://portableapps.com/apps/internet/firefox_portable

See attached shots.

This shows that the cert on twistedmatrix is somewhat lacking .. Firefox 
complains .. but I _do_ get HTTPS in the end.

Are you surfing from a university (or some other) intranet?

If so, the only reason I could think of is that the admins there have setup 
servers that _intercept_ the initial HTTPS negotiation.

How to prove that? Well, that would now get quite technical .. not sure if you 
want to do that;)

Or: just call them up;)

If you are surfing from a regular residential dial-up or such: I have no clue 
why that happens to you ..

/Tobias

> -Ursprüngliche Nachricht-
> Von: twisted-python-boun...@twistedmatrix.com [mailto:twisted-python- 
> boun...@twistedmatrix.com] Im Auftrag von Daniel Sank
> Gesendet: Donnerstag, 24. Oktober 2013 09:35
> An: Twisted general discussion
> Betreff: Re: [Twisted-Python] "mind" introduced strangely in pb howto
> 
> > If you care, could you open the page in your browser, double click 
> > the small "lock icon" left to the "https://"; in the address bar and 
> > send a screenshot of the dialog shown (as the one attached)?
> 
> Tried. Can't. Whenever I try to log in or out (bear with me) the lock 
> turns into a globe and I see firefox's security warning thingy.
> Clicking on the globe shows the screens as given in attachments.
> 
> Now you ask how can I be logging out if I never was able to log in?
> After submitting the registration info I got the security warning so I 
> left that page and emailed the list. When I went back to 
> twistedmatrix.com to try again I was already logged in. Now when I 
> click the log out link I get the same security warning. Is it possible 
> that only the page resulting from log in/out has this problem? Again, 
> I know next to nothing about web security (unless it involved quantum 
> encryption in which case I'll talk your ears off).

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] epoll keep sharing state between process even after fork.

2013-10-24 Thread Flint
>
> To expand on that just a bit, the form of sharing that you get when you
> fork() but you don't exec() is very difficult to use correctly (I think
> it's an open question whether it's *possible* to use correctly in a Python
> program).
>
> The argument here is similar to the argument against shared-everything
> multithreading.  While memory (and some other per-process state) is no
> longer shared after fork(), *some* per-process state is still shared. And
> all of the state that isn't shared is still a potential source of bugs
> since it's almost certainly the case that none of it cooperated with the
> fork() call - a call which happened at some arbitrary time and captured a
> snapshot of all the state in memory at an arbitrary point.
>
> Consider a simple implementation of a lock file, used to prevent multiple
> instances of a program from starting.  There are several ways fork() could
> break such code.  Perhaps it is partway through acquiring a lock on the
> lock file when the fork() occurs.  Perhaps the result is that the file ends
> up locked but no process thinks it is holding the lock.  Now no instances
> of the program are running.  Or perhaps the lock is held when fork()
> happens and the problem only surfaces at unlock time.  Perhaps one of the
> processes exits and releases the lock.  Now the program is still running
> but the lock isn't held.
>
> And that's just one of the simplest possible examples of how things can go
> wrong.
>
> The nearly uncountable different ways for failures to creep in and the
> resulting impracticality (if not impossibility) of being able to test that
> Twisted (or any Python library) actually works when fork() is used means
> that it's not likely Twisted will ever be declared compatible with any
> fork()-without-exec() usage.
>
> You can find some examples of Twisted-using applications that run multiple
> processes, though.  Apple CalendarServer does it by passing file
> descriptors to worker processes and sends them the location of a
> configuration file describing how they should behave.  Divmod Mantissa does
> it by inserting self-describing work into a SQLite3 database.  When the
> worker process finds one of these, it knows what code to load and run by
> looking at the fields in the row.  These are variations on a theme - RPC,
> not shared (or duplicated) memory.
>
> Hope this helps,
> Jean-Paul


Thankx a lot.

I'll probably rethink everything in my project hehe, but i'm glad I asked !
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] "mind" introduced strangely in pb howto

2013-10-24 Thread Glyph

On Oct 24, 2013, at 12:48 AM, Tobias Oberstein  
wrote:

> However: this all does not explain (at least I dont understand) why the OP 
> has that issue showing up .. Firefox is able to load intermediate CA certs 
> from the net .. I have seen it .. also for StartSSL certs. Something is 
> breaking this. Maybe it's MITM TLS, maybe they blocked intermediate cert 
> auto-loading, .. dunno.

Firefox does not load intermediate CA certs from the network.  It - and pretty 
much all other browsers, as far as I know - will sometimes magically cache 
intermediary certificates.  So if you visit the site in a browser that happens 
to have had the right intermediate CA certificate cached (probably because you 
visited another StartSSL free site, in twistedmatrix.com's case) then you will 
get no warning.  This is why most people don't actually see a warning on the 
site :-).

But we'll have this problem fixed For Real soon!

-glyph

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] FTP without the protocol

2013-10-24 Thread Lloyd Carothers

On 10/23/13 7:30 PM, David Bolen wrote:

Lloyd Carothers  writes:


  For such a use case I'm surprised not to find an example. I think I
just need a push in the right direction. Is producers/consumers the
right approach?

It's a bit dated at this point, but maybe this might spark some ideas:
http://twistedmatrix.com/pipermail/twisted-python/2007-July/015738.html

It's producer/consumer, which yes, is very efficient for streaming
transfers.  The code the post was based on is actually still in active
use, but against an older twisted 2.5.0 installation, so I'm not sure
how much tweaking it may need to adjust to the latest Twisted version.
This looks pretty close to what I need and definitely a good starting 
point for me. I can make use of session specific information too, which 
will be nice.
As you've been using it for a while, have you had any issues. Is it 
robust/stable?

In practice this is paired with a separate set of code that implements a
PB-based control channel over which the files to upload are negotiated.

Would you be willing to share this as well?

The binary transfer itself just has a small header in front of the data
containing some authentication and size information, so it's derived
from LineReceiver and switches to raw mode for the transfer.  While I
tend to prefer a separate control channel (though it certainly doesn't
need to be PB based), you could also in-line the control information (so
it becomes more like an HTTP transfer) if you wished.

Gotcha.
Maybe this is new since you wrote the above, but is FileSender the 
producer to use here?
Perhaps its not fully developed but should there not also be a 
compliment FileReceiver  to consume the file and write it out?

BTW, passive FTP should be quite firewall friendly, unless you're
talking about really locked down locations where the only thing allowed
out is HTTP or something.  But if you're not using passive mode yet,
that might also be a quicker fix to your existing code base.
Indeed, I use passive mode exclusively as clients often come from NATed 
nets.
Generally FTP works ok but some organizations firewalls do strange 
things with that traffic, and even the good connections seem to have 
sporadic drops which often aren't handled well, at least with proftp.





-- David


___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python




___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


[Twisted-Python] Twisted 13.2.0pre1 Testing Feedback

2013-10-24 Thread HawkOwl

Hi everyone,

I've yet to hear back from anyone testing the prerelease - if you're 
able to, please do!


Especially of interest to be tested would be the new HostnameEndpoint, 
which tries to connect to both the IPv4 and IPv6 addresses from a DNS 
lookup, and uses whichever is first - it makes Glyph excited for its 
inclusion, so it ought to make you ;) .


It also supports SSL chain certificates, which should also fix up some 
issues using TLS with Twisted - this would also be great for people to 
test, and will hopefully remove a bunch of monkeypatching in everyone's 
code.


Unless there are problems brought to our attention, it is unlikely that 
the 13.2.0pre will be different from the final release - so you can also 
use it to run against your application's test suites, so you know you're 
ready for upgrading to the full release later. :)


The tarballs and NEWS file are available at 
http://twistedmatrix.com/Releases/pre/13.2.0pre1/ .


The ticket for the 13.2 release is at 
https://twistedmatrix.com/trac/ticket/6795 - please comment on it if you 
have any issues!


-hawkowl

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Clean pb solution for two-way object sync?

2013-10-24 Thread Daniel Sank
> That will atomically combine the propagation of initial state with the 
> provision of the
> back-propagation channel for updates to that state.

My understanding of Cacheable is that it propagates initial state to
the RemoteCache and then sends subsequent updates also to the
RemoteCache. What I was originally asking about was how to allow the
side holding the RemoteCache to request changes on the Cacheable. Your
phrase "back-propagation" leads me to think that maybe this kind of
thing is built into Cacheable, but I have not discovered how to use
it.

All of that said, in the end the answer to my original question seems
to be "read this howto page:"

http://twistedmatrix.com/documents/current/core/howto/pb-cred.html

and then use the mind argument.

Sincere thanks for your help,
Daniel

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python