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

# sec_protocol_metadata_access_peer_certificate_chain(_:_:)

## Declaration

```swift
func sec_protocol_metadata_access_peer_certificate_chain(_ metadata: sec_protocol_metadata_t, _ handler: @escaping (sec_certificate_t) -> Void) -> Bool
```

## Parameters

- `metadata`: A sec_protocol_metadata_t instance.
- `handler`: A block to invoke one or more times with sec_certificate_t objects

## Return Value

Return Value Returns true if the peer certificates were accessible, false otherwise.

## Discussion

Discussion Get the certificate chain of the protocol instance peer.
