/*************************************************************************** * Copyright (c) 2024 Microsoft Corporation * Copyright (c) 2025-present Eclipse ThreadX Contributors * * This program and the accompanying materials are made available under the * terms of the MIT License which is available at * https://opensource.org/licenses/MIT. * * SPDX-License-Identifier: MIT **************************************************************************/ /**************************************************************************/ /**************************************************************************/ /** */ /** NetX Secure Component */ /** */ /** Transport Layer Security (TLS) */ /** */ /**************************************************************************/ /**************************************************************************/ #define NX_SECURE_SOURCE_CODE #include "nx_secure_tls.h" /* Bring in externs for caller checking code. */ NX_SECURE_CALLER_CHECKING_EXTERNS /**************************************************************************/ /* */ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_metadata_size_calculate PORTABLE C */ /* 6.4.3 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ /* */ /* DESCRIPTION */ /* */ /* This function checks for errors in the */ /* _nx_secure_tls_metadata_size_calculate call */ /* */ /* INPUT */ /* */ /* cipher_table Ciphersuite table to analyze */ /* metadata_size Size needed to support the */ /* given ciphersuite table */ /* */ /* OUTPUT */ /* */ /* status Completion status */ /* */ /* CALLS */ /* */ /* _nx_secure_tls_metadata_size_calculate */ /* Actual metadata size */ /* calculate call */ /* */ /* CALLED BY */ /* */ /* Application Code */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_metadata_size_calculate(const NX_SECURE_TLS_CRYPTO *cipher_table, ULONG *metadata_size) { UINT status; if ((cipher_table == NX_NULL) || (metadata_size == NX_NULL)) { return(NX_PTR_ERROR); } /* Check for appropriate caller. */ NX_THREADS_ONLY_CALLER_CHECKING status = _nx_secure_tls_metadata_size_calculate(cipher_table, metadata_size); return(status); }