Open beauremus opened 2 years ago
If this post can be believed this is a one-line change after importing the SSL module. This would be a good first issue. https://stackoverflow.com/questions/26851034/opening-a-ssl-socket-connection-in-python
I'll take it, please!
Thanks for volunteering, @potap75 !
What should I use as an upstream master? v1.0.0rc6 ?
Yes. That's correct.
thank you!
I keep getting: "fatal: branch 'master' does not exist"
When I'm trying to setup a branch in PyCharm: git branch --set-upstream-to=upstream/v1.0.0rc6
Yes. Branch master doesn't exist. The branches are labeled by major version so you want v1.x
.
Strange. We set v1.x
to be the default branch so, when you check it out, I would have thought you would get that branch.
This is what I get when I try to set a branch:
Anyways. Maybe I can contribute directly here:
import socket
import ssl
hostname = ''
context = ssl.create_default_context()
with socket.create_connection((hostname, 443)) as sock:
with context.wrap_socket(sock, server_hostname=hostname) as ssock:
print(ssock.version())
EDIT: Code highlighting
Thank you for the contribution, @potap75.
We're using the async
features of Python3 so our TCP socket is hidden in the Transport
class. Looking at the 3.10 documentation, I see there's a chance that the asyncio
library supports SSL sockets, if we choose the proper set-up options. Hopefully this also works for 3.6.
UPDATE: It looks like we can do something like this:
con_fut = loop.create_connection(lambda: self,
host='acsys-proxy.fnal.gov',
port=self.port,
ssl=True)
e56b8d6d2e3aaf96223fc13b6b034c0e7b0af1bb is the proposed change.
We're getting sslv3 handshake errors but, when I point the Python script to a non-DPM SSL server, this code connects. So @charlieking65 and I think it's a config issue on the proxy.
Here's an HTTPS implementation that seems like it could be useful for our socket communications. https://chaobin.github.io/2015/07/22/a-working-understanding-on-SSL-and-HTTPS-using-python/