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

# SSLSetSessionConfig(_:_:)

Sets a predefined configuration for the Secure Sockets Layer (SSL) session.

```
func SSLSetSessionConfig(_ context: SSLContext, _ config: CFString) -> OSStatus
```

## Parameters

`context`

An SSL session context reference.

`config`

The predefined configuration you want to apply to the SSL session. You can configure enabled protocol versions, enabled cipher suites, and the [`SSLSessionOption.fallback`](/documentation/Security/SSLSessionOption/fallback) session option.

## 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)