<!--
{
  "availability" : [
    "iOS: 11.0.0 - 13.0.0",
    "iPadOS: 11.0.0 - 13.0.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "macOS: 10.13.0 - 10.15.0"
  ],
  "documentType" : "symbol",
  "framework" : "Security",
  "identifier" : "/documentation/Security/SSLSetALPNProtocols(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Security"
    ],
    "preciseIdentifier" : "c:@F@SSLSetALPNProtocols"
  },
  "title" : "SSLSetALPNProtocols(_:_:)"
}
-->

# SSLSetALPNProtocols(_:_:)

Sets the list of supported applicaiton layer protocols.

```
func SSLSetALPNProtocols(_ context: SSLContext, _ protocols: CFArray) -> OSStatus
```

## Parameters

`context`

The session context.

`protocols`

An array of ASCII-encoded strings representing the supported protocols, such as `http/1.1`. See [RFC 7301](https://tools.ietf.org/html/rfc7301) for more details.

## Return Value

A result code. See [Secure Transport Result Codes](/documentation/Security/secure-transport-result-codes).

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)