---
title: "SSLGetClientCertificateState(_:_:)"
framework: security
role: symbol
role_heading: Function
path: "security/sslgetclientcertificatestate(_:_:)"
---

# SSLGetClientCertificateState(_:_:)

Retrieves the exchange status of the client certificate.

## Declaration

```swift
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 doc://com.apple.security/documentation/Security/SSLClientCertificateState for a list of possible values.

## Return Value

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

## Discussion

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.
