blob: 3c01bbf06440fab84a57d2e568441513a05a2fbf [file] [log] [blame]
Ronald Cron3d580bf2022-02-18 17:24:56 +01001/**
2 * TLS 1.2 and 1.3 client-side functions
3 *
4 * Copyright The Mbed TLS Contributors
5 * SPDX-License-Identifier: Apache-2.0
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License"); you may
8 * not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19
20#ifndef MBEDTLS_SSL_CLIENT_H
21#define MBEDTLS_SSL_CLIENT_H
22
23#include "common.h"
24
25#if defined(MBEDTLS_SSL_TLS_C)
26#include "ssl_misc.h"
27#endif
28
29#include <stddef.h>
30
Ronald Cron757a2ab2022-03-30 13:57:40 +020031/**
32 * \brief Validate cipher suite against config in SSL context.
33 *
34 * \param ssl SSL context
35 * \param suite_info Cipher suite to validate
36 * \param min_minor_ver Minimal minor version to accept a cipher suite
37 * \param max_minor_ver Maximal minor version to accept a cipher suite
38 *
39 * \return 0 if valid, negative value otherwise.
40 */
41int mbedtls_ssl_validate_ciphersuite(
42 const mbedtls_ssl_context *ssl,
43 const mbedtls_ssl_ciphersuite_t *suite_info,
44 int min_minor_ver, int max_minor_ver );
45
Ronald Cron3d580bf2022-02-18 17:24:56 +010046int mbedtls_ssl_write_client_hello( mbedtls_ssl_context *ssl );
47
48#endif /* MBEDTLS_SSL_CLIENT_H */