---
title: "SSLCopyRequestedPeerName(_:_:_:)"
framework: security
role: symbol
role_heading: Function
path: "security/sslcopyrequestedpeername(_:_:_:)"
---

# SSLCopyRequestedPeerName(_:_:_:)

Determines the buffer size needed for the peer domain name.

## Declaration

```swift
func SSLCopyRequestedPeerName(_ context: SSLContext, _ peerName: UnsafeMutablePointer<CChar>, _ peerNameLen: UnsafeMutablePointer<Int>) -> OSStatus
```

## Parameters

- `context`: An SSL session context reference.
- `peerName`: The fully qualified domain name of the peer—for example, store.apple.com. The name is in the form of a C string, except that NULL termination is optional.
- `peerNameLen`: On return, points to the length of the peer domain name.

## Return Value

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

## Discussion

Discussion Use the peerNameLen returned by this function when calling the SSLCopyRequestedPeerNameLength(_:_:) function.
