Function

SSLCopyRequestedPeerName

Determines the buffer size needed for the peer domain name.

Declaration

OSStatus SSLCopyRequestedPeerName(SSLContextRef context, char *peerName, size_t *peerNameLen);

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

A result code. See Secure Transport Result Codes.

Discussion

Use the peerNameLen returned by this function when calling the SSLCopyRequestedPeerNameLength function.

See Also

The Peer Domain Name

SSLSetPeerDomainName

Specifies the fully qualified domain name of the peer.

SSLGetPeerDomainNameLength

Determines the length of a previously set peer domain name.

SSLGetPeerDomainName

Retrieves the peer domain name specified previously.

SSLCopyRequestedPeerNameLength

Obtains the hostname specified by the client in the ServerName extension (SNI). Server only.