---
title: "sec_protocol_options_set_tls_server_name(_:_:)"
framework: security
role: symbol
role_heading: Function
path: "security/sec_protocol_options_set_tls_server_name(_:_:)"
---

# sec_protocol_options_set_tls_server_name(_:_:)

## Declaration

```swift
func sec_protocol_options_set_tls_server_name(_ options: sec_protocol_options_t, _ server_name: UnsafePointer<CChar>)
```

## Parameters

- `options`: A sec_protocol_options_t instance.
- `server_name`: A NULL-terminated string carrying the server name.

## Discussion

Discussion Set the server name to be used when verifying the peer’s certificate. This will override the server name obtained from the endpoint.
