py-graphql-client icon indicating copy to clipboard operation
py-graphql-client copied to clipboard

How to skip ssl certificate verification?

Open gp2-gp2 opened this issue 3 years ago • 1 comments

Is there a way to send some flag to ignore ssl certificate check?

I have one environment which is failing to connect with below message:

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1131)

gp2-gp2 avatar Dec 02 '21 16:12 gp2-gp2

I added this in my local copy and it works:

# ignore certificate fix
import ssl

self._connection = websocket.create_connection(
            self.ws_url,
            subprotocols=[GQL_WS_SUBPROTOCOL],
            # ignore certificate fix
            sslopt={"cert_reqs": ssl.CERT_NONE},
        )

gp2-gp2 avatar Dec 02 '21 17:12 gp2-gp2