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

# SSLGetClientCertificateState(_:_:)

Retrieves the exchange status of the client certificate.

```
func SSLGetClientCertificateState(_ context: SSLContext, _ clientState: UnsafeMutablePointer<SSLClientCertificateState>) -> OSStatus
```

## Parameters

`context`

An SSL session context reference.

`clientState`

On return, a pointer to a value indicating the state of the client certificate exchange. See [`SSLClientCertificateState`](/documentation/Security/SSLClientCertificateState) for a list of possible values.

## Return Value

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

## Discussion

The value returned reflects the latest change in the state of the client certificate exchange. If either peer initiates a renegotiation attempt, Secure Transport resets the state to `kSSLClientCertNone`.

---

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)