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