AzureMXChip/MXCHIPAZ3166/core/lib/netxduo/nx_secure/src/nx_secure_tls_session_time_function_set.c
UINT _nx_secure_tls_session_time_function_set(NX_SECURE_TLS_SESSION *tls_session,
                                              ULONG (*time_func_ptr)(void))
{
    /* Set the function pointer in the TLS session. */
    tls_session -> nx_secure_tls_session_time_function = time_func_ptr;

    return(NX_SUCCESS);
}
/**************************************************************************/
/*                                                                        */
/*  FUNCTION                                               RELEASE        */
/*                                                                        */
/*    _nx_secure_tls_session_time_function_set            PORTABLE C      */
/*                                                           6.1          */
/*  AUTHOR                                                                */
/*                                                                        */
/*    Timothy Stapko, Microsoft Corporation                               */
/*                                                                        */
/*  DESCRIPTION                                                           */
/*                                                                        */
/*    This function sets up a function pointer that TLS will invoke when  */
/*    it needs to get the current time, which is used in various TLS      */
/*    handshake messages and for verification of certificates.            */
/*                                                                        */
/*    The function is expected to return the current GMT in UNIX 32-bit   */
/*    format (seconds since the midnight starting Jan 1, 1970, UTC,       */
/*    ignoring leap seconds), as per the ClientHello requirements in the  */
/*    TLS RFC 5246.                                                       */
/*                                                                        */
/*  INPUT                                                                 */
/*                                                                        */
/*    tls_session                           TLS control block             */
/*    time_func_ptr                         Pointer to time function      */
/*                                                                        */
/*  OUTPUT                                                                */
/*                                                                        */
/*    status                                Completion status             */
/*                                                                        */
/*  CALLS                                                                 */
/*                                                                        */
/*    None                                                                */
/*                                                                        */
/*  CALLED BY                                                             */
/*                                                                        */
/*    Application Code                                                    */
/*                                                                        */
/*  RELEASE HISTORY                                                       */
/*                                                                        */
/*    DATE              NAME                      DESCRIPTION             */
/*                                                                        */
/*  05-19-2020     Timothy Stapko           Initial Version 6.0           */
/*  09-30-2020     Timothy Stapko           Modified comment(s),          */
/*                                            resulting in version 6.1    */
/*                                                                        */
/**************************************************************************/
FUNCTION                                               RELEASE

_nx_secure_tls_session_time_function_set            PORTABLE C
6.1
AUTHOR

Timothy Stapko, Microsoft Corporation

DESCRIPTION

This function sets up a function pointer that TLS will invoke when
it needs to get the current time, which is used in various TLS
handshake messages and for verification of certificates.

The function is expected to return the current GMT in UNIX 32-bit
format (seconds since the midnight starting Jan 1, 1970, UTC,
ignoring leap seconds), as per the ClientHello requirements in the
TLS RFC 5246.

INPUT

tls_session                           TLS control block
time_func_ptr                         Pointer to time function

OUTPUT

status                                Completion status

CALLS

None

CALLED BY

Application Code

RELEASE HISTORY

DATE              NAME                      DESCRIPTION

05-19-2020     Timothy Stapko           Initial Version 6.0
09-30-2020     Timothy Stapko           Modified comment(s),
resulting in version 6.1
FUNCTION RELEASE _nx_secure_tls_session_time_function_set PORTABLE C 6 . 1 AUTHOR Timothy Stapko Microsoft Corporation DESCRIPTION This function sets up a function pointer that TLS will invoke when it needs to get the current time which is used in various TLS handshake messages and for verification of certificates . The function is expected to return the current GMT in UNIX 32 - bit format ( seconds since the midnight starting Jan 1 1970 UTC ignoring leap seconds ) as per the ClientHello requirements in the TLS RFC 5246 . INPUT tls_session TLS control block time_func_ptr Pointer to time function OUTPUT status Completion status CALLS None CALLED BY Application Code RELEASE HISTORY DATE NAME DESCRIPTION 05 - 19 - 2020 Timothy Stapko Initial Version 6 . 0 09 - 30 - 2020 Timothy Stapko Modified comment ( s ) resulting in version 6 . 1
UINT _nx_secure_tls_session_time_function_set(NX_SECURE_TLS_SESSION *tls_session,
                                              ULONG (*time_func_ptr)(void))
{
    tls_session -> nx_secure_tls_session_time_function = time_func_ptr;
    return(NX_SUCCESS);
}
UINT _nx_secure_tls_session_time_function_set ( NX_SECURE_TLS_SESSION * tls_session , ULONG ( * time_func_ptr ) ( void ) ) { tls_session -> nx_secure_tls_session_time_function = time_func_ptr ; return ( NX_SUCCESS ) ; }
FUNCTION                                               RELEASE
FUNCTION RELEASE
/* Set the function pointer in the TLS session. */