<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Security",
  "identifier" : "/documentation/Security/SSLProtocol",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Security"
    ],
    "preciseIdentifier" : "c:@E@SSLProtocol"
  },
  "title" : "SSLProtocol"
}
-->

# SSLProtocol

An enumeration of valid SSL protocol versions.

```
enum SSLProtocol
```

## Overview

The descriptions given here apply to the functions [`SSLSetProtocolVersion`](/documentation/Security/SSLSetProtocolVersion) and [`SSLGetProtocolVersion`](/documentation/Security/SSLGetProtocolVersion). For the functions [`SSLSetProtocolVersionEnabled`](/documentation/Security/SSLSetProtocolVersionEnabled) and [`SSLGetProtocolVersionEnabled`](/documentation/Security/SSLGetProtocolVersionEnabled), only the following values are used. For these functions, each constant except [`SSLProtocol.sslProtocolAll`](/documentation/Security/SSLProtocol/sslProtocolAll) specifies a single protocol version.

- [`SSLProtocol.sslProtocol2`](/documentation/Security/SSLProtocol/sslProtocol2)
- [`SSLProtocol.sslProtocol3`](/documentation/Security/SSLProtocol/sslProtocol3)
- [`SSLProtocol.tlsProtocol1`](/documentation/Security/SSLProtocol/tlsProtocol1)
- [`SSLProtocol.sslProtocolAll`](/documentation/Security/SSLProtocol/sslProtocolAll)

## Topics

### SSL Protocols

[`SSLProtocol.sslProtocolUnknown`](/documentation/Security/SSLProtocol/sslProtocolUnknown)

Specifies that no protocol has been or should be negotiated or specified; use default.

[`SSLProtocol.sslProtocol2`](/documentation/Security/SSLProtocol/sslProtocol2)

Specifies that only the SSL 2.0 protocol may be negotiated. Deprecated in iOS.

[`SSLProtocol.sslProtocol3`](/documentation/Security/SSLProtocol/sslProtocol3)

Specifies that the SSL 3.0 protocol is preferred; the SSL 2.0 protocol may be negotiated if the peer cannot use the SSL 3.0 protocol.

[`SSLProtocol.sslProtocol3Only`](/documentation/Security/SSLProtocol/sslProtocol3Only)

Specifies that only the SSL 3.0 protocol may be negotiated; fails if the peer tries to negotiate the SSL 2.0 protocol. Deprecated in iOS.

[`SSLProtocol.sslProtocolAll`](/documentation/Security/SSLProtocol/sslProtocolAll)

Specifies all supported versions. Deprecated in iOS.

### TLS Protocols

[`SSLProtocol.tlsProtocol1`](/documentation/Security/SSLProtocol/tlsProtocol1)

Specifies that the TLS 1.0 protocol is preferred but lower versions may be negotiated.

[`SSLProtocol.tlsProtocol1Only`](/documentation/Security/SSLProtocol/tlsProtocol1Only)

Specifies that only the TLS 1.0 protocol may be negotiated. Deprecated in iOS.

[`SSLProtocol.tlsProtocol11`](/documentation/Security/SSLProtocol/tlsProtocol11)

Specifies that the TLS 1.1 protocol is preferred but lower versions may be negotiated.

[`SSLProtocol.tlsProtocol12`](/documentation/Security/SSLProtocol/tlsProtocol12)

Specifies that the TLS 1.2 protocol is preferred but lower versions may be negotiated.

[`SSLProtocol.tlsProtocol13`](/documentation/Security/SSLProtocol/tlsProtocol13)

Specifies that the TLS 1.3 protocol is preferred but lower versions may be negotiated.

[`SSLProtocol.tlsProtocolMaxSupported`](/documentation/Security/SSLProtocol/tlsProtocolMaxSupported)

The maximum system supported version.

### DTLS Protocols

[`SSLProtocol.dtlsProtocol1`](/documentation/Security/SSLProtocol/dtlsProtocol1)

Specifies the DTLS 1.0 protocol.

[`SSLProtocol.dtlsProtocol12`](/documentation/Security/SSLProtocol/dtlsProtocol12)

Specifies the DTLS 1.2 protocol.



---

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)