---
title: "SSLCopyDistinguishedNames(_:_:)"
framework: security
role: symbol
role_heading: Function
path: "security/sslcopydistinguishednames(_:_:)"
---

# SSLCopyDistinguishedNames(_:_:)

Retrieves the distinguished names of acceptable certification authorities.

## Declaration

```swift
func SSLCopyDistinguishedNames(_ context: SSLContext, _ names: UnsafeMutablePointer<CFArray?>) -> OSStatus
```

## Parameters

- `context`: An SSL session context reference.
- `names`: On return, an array of CFDataRef objects, each representing one DER-encoded relative distinguished name of an acceptable certification authority. You must call the CFRelease function to release this array when you are finished with it.

## Return Value

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

## Discussion

Discussion The list of distinguished names is provided by the server if the context reference represents a client; if the context reference represents a server, the list of distinguished names is specified with the SSLSetCertificateAuthorities(_:_:_:) function. The array retrieved by this function is suitable for use in finding a client identity (that is, a certificate and associated private key) that matches a server’s requirements.

## See Also

### Related Documentation

- [SSLSetCertificateAuthorities(_:_:_:)](security/sslsetcertificateauthorities(_:_:_:).md)
- [SSLCopyCertificateAuthorities(_:_:)](security/sslcopycertificateauthorities(_:_:).md)
