tfPop3UseSsl

Jump to: navigation, search

Table of Contents >> Optional Protocols >> POP3


#include <trsocket.h>


int tfPop3UseSsl (
ttPop3ClientHandle pop3Handle,
int sslSessionId,
char TM_FAR * sslServerCommonName
);


Function Description

This function enables SSL for the specified POP3 session.


Parameters

  • pop3Handle
    This is set to the pop3Handle for which socket options should be set.
  • sslSessionId
    This is set to an SSL session ID obtained by calling tfSslNewSession
  • sslServerCommonName
    This is set to the common name of the SSL server as expected by tfSslClientUserStart. This name can be NULL.


Returns

  • TM_EINVAL
    This indicates failure. The kernel found invalid arguments in the call.
  • TM_ENOBUFS
    This indicates failure due to a failed memory allocation when attempting to store a copy of the sslServerCommonName.
  • TM_ENOERROR
    This indicates success.


Usage

Create a new SSL session and pass it to this function. POP3 will utilize the given session until tfPop3UserDisconnect or tfPop3FreeSession is called. The SSL session is however not destroyed, it is disassociated with the POP3 session. Thus, the SSL session can be further used with subsequent calls to this interface. Use tfSslSessionUserClose to remove the session.

Table of Contents >> Optional Protocols >> POP3