# aiohttp.client_exceptions.ClientConnectorSSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed

- **ID:** `python/aiohttp-client-connector-ssl-error`
- **Domain:** python
- **Category:** network_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The SSL certificate of the remote server is invalid, expired, or not trusted by the system's CA bundle.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.9 | active | — | — |
| 3.10 | active | — | — |

## Workarounds

1. **Update system CA certificates** (80% success)
   ```
   pip install certifi
# or update OS CA bundle
   ```
2. **Provide a custom SSL context with trusted certificates** (90% success)
   ```
   import ssl
ssl_context = ssl.create_default_context(cafile='/path/to/cert.pem')
async with aiohttp.ClientSession(connector=aiohttp.TCPConnector(ssl=ssl_context)) as session:
   ```

## Dead Ends

- **Disabling SSL verification entirely with ssl=False** — This bypasses security and may lead to man-in-the-middle attacks; also not recommended for production. (30% fail)
- **Using a custom SSL context without proper certificates** — If the custom context is not configured correctly, the error persists. (60% fail)
