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


Groups > comp.lang.python > #92330

Using ssl module over custom sockets

X-Received by 10.70.96.41 with SMTP id dp9mr21808194pdb.13.1433748169651; Mon, 08 Jun 2015 00:22:49 -0700 (PDT)
X-Received by 10.140.20.148 with SMTP id 20mr164831qgj.20.1433748169391; Mon, 08 Jun 2015 00:22:49 -0700 (PDT)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!h15no1888161igd.0!news-out.google.com!k20ni45297qgd.0!nntp.google.com!q107no670369qgd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.python
Date Mon, 8 Jun 2015 00:22:49 -0700 (PDT)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=217.24.201.180; posting-account=K2lzfwoAAAB7832lAcqRrVyWgxNYbPSL
NNTP-Posting-Host 217.24.201.180
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <9d27cf3f-3edc-4ff0-ba69-0fc588e049a6@googlegroups.com> (permalink)
Subject Using ssl module over custom sockets
From jbauer.usenet@gmail.com
Injection-Date Mon, 08 Jun 2015 07:22:49 +0000
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Xref csiph.com comp.lang.python:92330

Show key headers only | View raw


Hi group,

is it possible to use the ssl module using a custom transport? It appears to me as if currently the relationship between ssl.SSLSocket() and socket.socket() is pretty entangled.

Suppose I do have some kind of reliable transport (let's say RS232) and a connection that I have wrapped in a class. The things I can provide are send/recv methods, but nothing specific to UNIX sockets (getsockopt, etc). Could I use the Python ssl module to perform a SSL connection over such a line?

Something that I could always use as a workaround would be to open up a listening port locally in one thread and connection to that local port in a different thread, then forward packets. But that's pretty ugly and I'd like to avoid it.

Any hints appreciated,
Best regards,
Johannes

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


Thread

Using ssl module over custom sockets jbauer.usenet@gmail.com - 2015-06-08 00:22 -0700
  Re: Using ssl module over custom sockets Johannes Bauer <dfnsonfsduifb@gmx.de> - 2015-06-08 17:25 +0200

csiph-web