'i get 'SSL routines', 'ssl3_get_record', 'wrong version number' Error

when i send post request to daemon server using curl it shows below.

[Faulure instance: Traceback (failure with no frames): <class 'twisted.web._newClient.ResponseNeverReceived'>: [<twisted.python.failure.Failure OpenSSL.SSL.Error: [('SSL routines', 'ssl_get_record', 'wrong version number')]>]

def creatorForNetloc(self, hostname, port):
        with open(self.ssl_pem_file_path) as pem_file:
            with open(self.ssl_key_file_path) as key_file:
                cert = ssl.PrivateCertificate.loadPEM(pem_file.read() + key_file.read())
        return CertificateOptions(
            cert.privateKey.original,
            cert.original,
            requireCertificate=False,
            verify=False)

i use openssl 1.0.2(centos7.9), pyopenssl 19.1.0 and use tls1.2

when i use openssl check it returns verify code 21 is this could be the problem?

how do i do?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source