---
sidebar:
  label: roboto.http.tls
  order: 10
title: roboto.http.tls
---
## Module Contents

### https_ssl_context()

```python
def roboto.http.tls.https_ssl_context() -> ssl.SSLContext
```

`from roboto.http.tls import https_ssl_context`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/http/tls.py#L15-L34)

TLS settings for HTTPS requests to the Roboto API, reads of files by URL, and the CLI's downloads.

Requests made through boto3, such as S3 transfers, use botocore's certificate settings instead.

Certificates are checked against the operating system's trusted roots, so a root an administrator installed there is trusted. Windows and macOS check them with their own certificate APIs; Linux reads the system CA bundle. On Windows this also finds the roots Windows downloads only when first needed. A new Windows machine starts with few roots, and Python's built-in check (the `ssl` module's default context) sees only the roots already there.

When `SSL_CERT_FILE` or `SSL_CERT_DIR` is set, Python's built-in check runs instead and trusts the certificates at those paths, since the Windows and macOS checks ignore both variables. The variables are read on the first call, and every later call returns the same context.

**Returns**

- `ssl.SSLContext`: A client context that verifies the server's certificate and host name.
