title: Python ssl client can't connect to socketserver with ssl
body: <p>I am trying to create a server in python using socketserver and ssl.
  It needs to work on TLS version 1.2 only.
  I am trying to connect a client to it just to see that it works.
  I know the server works without ssl, so it is the problem.</p>
  
  <p>I do not know why i am getting this error. Even if I remove all changes to the context, they still won't connect.</p>
  
  <pre><code>class MyServer(socketserver.ThreadingTCPServer):
      """My server."""
      def __init__(self, server_address, RequestHandlerClass, bind_and_activate=True):
          """Create a new server.
          If bind_and_activate is True, calls server_bind and server_activate."""
          super().__init__(server_address, RequestHandlerClass, bind_and_activate=False)
          context = ssl.SSLContext()
          context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1
          context.set_ciphers("ECDHE-ECDSA-CHACHA20-POLY1305:AES256-GCM-SHA384")
          context.set_ecdh_curve("secp256k1")
          context.verify_mode = ssl.CERT_NONE
          self.socket = socket.socket()
          self.socket = context.wrap_socket(self.socket, server_side=True)
          self.allow_reuse_address = True
          if bind_and_activate:
              self.server_bind()
              self.server_activate()
  </code></pre>
  
  <p>client:</p>
  
  <pre><code>context = ssl.SSLContext()
  context.verify_mode = ssl.CERT_NONE
  context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1
  context.set_ciphers("ECDHE-ECDSA-CHACHA20-POLY1305:AES256-GCM-SHA384")
  context.set_ecdh_curve("secp256k1")
  sock = socket.socket()
  sock = context.wrap_socket(sock, server_side=False)
  sock.connect(("localhost", 32571))    # port server is running on.
  print("Connected")
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1056)
  </code></pre>
  
  <p>I just want to create a connection between them.</p>