acoustic-carpenter-78188
04/07/2026, 7:23 PMinsecureSkipVerify: true failed with invalid peer certificate: UnknownIssuer when connecting to servers using corporate/private CA certs
• Root cause: ssl.get_server_certificate() returns only the leaf certificate — insufficient for rustls (pyqwest) to verify chains signed by non-system CAs
• Fix: use pyOpenSSL's SSL.Connection.get_peer_cert_chain() to retrieve the full certificate chain (leaf + intermediates + root) on all supported Python versions (>= 3.10)
Test plan
• Existing session tests updated and passing (16/16)
• Smoke tested against live server (google.com) — retrieves full 3-cert chain
• Verify with a corporate/private CA endpoint using insecureSkipVerify: true
flyteorg/flyte-sdkacoustic-carpenter-78188
04/07/2026, 7:56 PM