Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #105451

Re: Using SSL socket as stdin for subprocess.Popen

From dieter <dieter@handshake.de>
Newsgroups comp.lang.python
Subject Re: Using SSL socket as stdin for subprocess.Popen
Date 2016-03-22 09:22 +0100
Message-ID <mailman.484.1458634948.12893.python-list@python.org> (permalink)
References <56ED901A.5060704@gmail.com>

Show all headers | View raw


Matt Ruffalo <matt.ruffalo@gmail.com> writes:
> ...
> I've been using SSL for the communication between the client and server,
> ...
> I've hit an issue that I'm not sure how to work through, though. I'm
> attempting to use a SSL socket (and/or the result of its 'makefile'
> method) directly as the `stdin` argument to subprocess.Popen, but it
> seems that the *encrypted* data is used by the subprocess.

In order to access an SSL socket, something special must be done
during the connection(/opening) phase: then certificates are
exchanged/verified and a common session key is created (used
to encrypt the exchanged data). Only after this special handling
it the SSL socket transparent.

Your observation indicates that your socket is not opened
in this special SSL way - thus, you get the raw data.

Likely, you must make sure that proper SSL initialization has taken
place before you hand the socket down as "stdin" to your "subprocess.Popen".

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Using SSL socket as stdin for subprocess.Popen dieter <dieter@handshake.de> - 2016-03-22 09:22 +0100

csiph-web