60bfe60d0f
Store the TLS version in tls_version instead of major, minor version num Note: existing application use which accesses the struct member (using MBEDTLS_PRIVATE) is not compatible, as the struct is now smaller. Reduce size of mbedtls_ssl_ciphersuite_t members are defined using integral types instead of enums in order to pack structure and reduce memory usage by internal ciphersuite_definitions[] Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
49 lines
1.5 KiB
C
49 lines
1.5 KiB
C
/**
|
|
* TLS 1.2 and 1.3 client-side functions
|
|
*
|
|
* Copyright The Mbed TLS Contributors
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
* not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
#ifndef MBEDTLS_SSL_CLIENT_H
|
|
#define MBEDTLS_SSL_CLIENT_H
|
|
|
|
#include "common.h"
|
|
|
|
#if defined(MBEDTLS_SSL_TLS_C)
|
|
#include "ssl_misc.h"
|
|
#endif
|
|
|
|
#include <stddef.h>
|
|
|
|
/**
|
|
* \brief Validate cipher suite against config in SSL context.
|
|
*
|
|
* \param ssl SSL context
|
|
* \param suite_info Cipher suite to validate
|
|
* \param min_tls_version Minimal TLS version to accept a cipher suite
|
|
* \param max_tls_version Maximal TLS version to accept a cipher suite
|
|
*
|
|
* \return 0 if valid, negative value otherwise.
|
|
*/
|
|
int mbedtls_ssl_validate_ciphersuite(
|
|
const mbedtls_ssl_context *ssl,
|
|
const mbedtls_ssl_ciphersuite_t *suite_info,
|
|
mbedtls_ssl_protocol_version min_tls_version,
|
|
mbedtls_ssl_protocol_version max_tls_version );
|
|
|
|
int mbedtls_ssl_write_client_hello( mbedtls_ssl_context *ssl );
|
|
|
|
#endif /* MBEDTLS_SSL_CLIENT_H */
|