---
title: "SSLSetOCSPResponse(_:_:)"
framework: security
role: symbol
role_heading: Function
path: "security/sslsetocspresponse(_:_:)"
---

# SSLSetOCSPResponse(_:_:)

Sets the OCSP response for the given SSL session.

## Declaration

```swift
func SSLSetOCSPResponse(_ context: SSLContext, _ response: CFData) -> OSStatus
```

## Parameters

- `context`: A session context.
- `response`: A non-NULL doc://com.apple.documentation/documentation/CoreFoundation/CFData instance containing the bytes of the OCSP response.

## Return Value

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