I need to connect to ipv6 server using pyopenssl .Is that even possible?For ipv4 i don't have any problem.This is what i'v tried for ipv6:
ctx = SSL.Context(SSL.SSLv23_METHOD)
ctx.set_verify(SSL.VERIFY_NONE, verify_cb)
ctx.use_privatekey_file (os.path.join(dir, 'client.pkey'))
ctx.use_certificate_file(os.path.join(dir, 'client.cert'))
ctx.load_verify_locations(os.path.join(dir, 'CA.cert'))
#Set up client
sock = SSL.Connection(ctx, socket.socket(socket.AF_INET6, socket.SOCK_STREAM))
sock.connect(('fe80::3a63:bbff:fe31:3013%ens32',443,0,0))
But i'm getting the following error:
sock.connect(('fe80::3a63:bbff:fe31:3013%ens32',443,0,0))
File "/root/Desktop/PY/ilodos2/venv/lib/python2.7/site-packages/OpenSSL/SSL.py", line 1455, in connect
return self._socket.connect(addr)
File "/usr/lib64/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
error: [Errno 22] Invalid argument
The documentation of pyopenssl does not talk about ipv6 at all. If pyopenssl cant be used for ipv6, are there any other modules using which i can do ssl renegotiation?