Contents

SSLGetPeerDomainNameLength(_:_:)

Determines the length of a previously set peer domain name.

Declaration

func SSLGetPeerDomainNameLength(_ context: SSLContext, _ peerNameLen: UnsafeMutablePointer<Int>) -> OSStatus

Parameters

  • context:

    An SSL session context reference.

  • peerNameLen:

    On return, points to the length of the peer domain name.

Return Value

A result code. See Secure Transport Result Codes.

Discussion

If you previously called the SSLSetPeerDomainName(_:_:_:) function to specify a fully qualified domain name for the peer certificate, you can use the SSLGetPeerDomainName(_:_:_:) function to retrieve the peer domain name. Before doing so, you must call the SSLGetPeerDomainNameLength(_:_:) function to retrieve the buffer size needed for the domain name.