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

# SSLGetProtocolVersionMax(_:_:)

Gets the maximum protocol version allowed by the application for a given SSL context.

## Declaration

```swift
func SSLGetProtocolVersionMax(_ context: SSLContext, _ maxVersion: UnsafeMutablePointer<SSLProtocol>) -> OSStatus
```

## Parameters

- `context`: The SSL context associated with the connection.
- `maxVersion`: The address of an doc://com.apple.security/documentation/Security/SSLProtocol integer where the maximum version should be stored. See doc://com.apple.security/documentation/Security/SSLProtocol for a list of possible values.

## Return Value

Return Value A result code. See Secure Transport Result Codes.
