1 /**************************************************************************/ 2 /* */ 3 /* Copyright (c) Microsoft Corporation. All rights reserved. */ 4 /* */ 5 /* This software is licensed under the Microsoft Software License */ 6 /* Terms for Microsoft Azure RTOS. Full text of the license can be */ 7 /* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */ 8 /* and in the root directory of this software. */ 9 /* */ 10 /**************************************************************************/ 11 12 13 /**************************************************************************/ 14 /**************************************************************************/ 15 /** */ 16 /** NetX Secure Component */ 17 /** */ 18 /** Transport Layer Security (TLS) */ 19 /** */ 20 /**************************************************************************/ 21 /**************************************************************************/ 22 23 #define NX_SECURE_SOURCE_CODE 24 25 #include "nx_secure_tls.h" 26 27 #if (NX_SECURE_TLS_TLS_1_3_ENABLED) 28 /**************************************************************************/ 29 /* */ 30 /* FUNCTION RELEASE */ 31 /* */ 32 /* _nx_secure_tls_process_encrypted_extensions PORTABLE C */ 33 /* 6.1 */ 34 /* AUTHOR */ 35 /* */ 36 /* Timothy Stapko, Microsoft Corporation */ 37 /* */ 38 /* DESCRIPTION */ 39 /* */ 40 /* This function processes the encrypted extensions received after a */ 41 /* ServerHello message in a TLS 1.3 encrypted handshake. */ 42 /* */ 43 /* INPUT */ 44 /* */ 45 /* tls_session TLS control block */ 46 /* packet_buffer Pointer to message data */ 47 /* message_length Length of message data (bytes)*/ 48 /* */ 49 /* OUTPUT */ 50 /* */ 51 /* status Completion status */ 52 /* */ 53 /* CALLS */ 54 /* */ 55 /* _nx_secure_tls_ciphersuite_lookup Lookup current ciphersuite */ 56 /* */ 57 /* CALLED BY */ 58 /* */ 59 /* _nx_secure_tls_server_handshake Process extensions */ 60 /* */ 61 /* RELEASE HISTORY */ 62 /* */ 63 /* DATE NAME DESCRIPTION */ 64 /* */ 65 /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ 66 /* 09-30-2020 Timothy Stapko Modified comment(s), update */ 67 /* ciphersuite lookup method, */ 68 /* resulting in version 6.1 */ 69 /* */ 70 /**************************************************************************/ _nx_secure_tls_process_encrypted_extensions(NX_SECURE_TLS_SESSION * tls_session,UCHAR * packet_buffer,UINT message_length)71UINT _nx_secure_tls_process_encrypted_extensions(NX_SECURE_TLS_SESSION *tls_session, 72 UCHAR *packet_buffer, UINT message_length) 73 { 74 UINT status; 75 76 status = NX_SUCCESS; 77 78 /* Process encrypted extensions here! */ 79 NX_PARAMETER_NOT_USED(packet_buffer); 80 NX_PARAMETER_NOT_USED(message_length); 81 82 #ifndef NX_SECURE_TLS_CLIENT_DISABLED 83 84 /* Set our state to indicate we successfully parsed the Certificate message. */ 85 tls_session -> nx_secure_tls_client_state = NX_SECURE_TLS_CLIENT_STATE_ENCRYPTED_EXTENSIONS; 86 #else 87 NX_PARAMETER_NOT_USED(tls_session); 88 #endif 89 90 91 return(status); 92 } 93 #endif 94 95