2022-02-18 17:24:56 +01:00
|
|
|
/**
|
|
|
|
* 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>
|
|
|
|
|
2022-03-30 13:57:40 +02:00
|
|
|
/**
|
|
|
|
* \brief Validate cipher suite against config in SSL context.
|
|
|
|
*
|
2022-03-15 00:04:24 +01:00
|
|
|
* \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
|
2022-03-30 13:57:40 +02:00
|
|
|
*
|
|
|
|
* \return 0 if valid, negative value otherwise.
|
|
|
|
*/
|
|
|
|
int mbedtls_ssl_validate_ciphersuite(
|
|
|
|
const mbedtls_ssl_context *ssl,
|
|
|
|
const mbedtls_ssl_ciphersuite_t *suite_info,
|
2022-03-15 00:04:24 +01:00
|
|
|
mbedtls_ssl_protocol_version min_tls_version,
|
|
|
|
mbedtls_ssl_protocol_version max_tls_version );
|
2022-03-30 13:57:40 +02:00
|
|
|
|
2022-02-18 17:24:56 +01:00
|
|
|
int mbedtls_ssl_write_client_hello( mbedtls_ssl_context *ssl );
|
|
|
|
|
|
|
|
#endif /* MBEDTLS_SSL_CLIENT_H */
|