MultipeerCertificateAuthenticator

public class MultipeerCertificateAuthenticator : MultipeerAuthenticator, CBLConvertible

A certificate authenticator used to verify a peer’s identity during multipeer replication.

  • Initializes the authenticator with a list of trusted root certificates.

    The peer’s certificate will be accepted only if it is signed by one of the specified root certificates.

    Declaration

    Swift

    public init(rootCerts: [SecCertificate])

    Parameters

    rootCerts

    An array of trusted root certificates (SecCertificate).

  • Initializes the authenticator with a custom certificate validation block.

    Declaration

    Swift

    public init(authenticator: @escaping (_ peer: PeerID, _ certs: [SecCertificate]) -> Bool)

    Parameters

    auth

    A closure that performs custom validation on the peer’s certificate chain.