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


Groups > comp.lang.python > #92330

Using ssl module over custom sockets

Newsgroups comp.lang.python
Date 2015-06-08 00:22 -0700
Message-ID <9d27cf3f-3edc-4ff0-ba69-0fc588e049a6@googlegroups.com> (permalink)
Subject Using ssl module over custom sockets
From jbauer.usenet@gmail.com

Show all headers | 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