I want to connect to the IRC, using SSL. I write in Python 2.7. However, for the code below:
HOST = 'chat.freenode.net' PORT = 7000 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) code = sock.connect_ex((HOST, PORT)) context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2) context.verify_mode = ssl.CERT_REQUIRED context.load_verify_locations('COMODOECCCertificationAuthority.crt') secure_sock = context.wrap_socket(sock) PyCharm shows error in line secure_sock = context.wrap_socket(sock) what is wrong?