tls_cipher_suites.c File Reference

TLS cipher suites. More...

#include "tls.h"
#include "tls_cipher_suites.h"
#include "cipher/cipher_algorithms.h"
#include "hash/hash_algorithms.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   TLS_TRACE_LEVEL
 

Functions

uint_t tlsGetNumSupportedCipherSuites (void)
 Determine the number of cipher suites supported. More...
 
const char_ttlsGetCipherSuiteName (uint16_t identifier)
 Convert cipher suite identifier to string representation. More...
 
bool_t tlsIsCipherSuiteAcceptable (const TlsCipherSuiteInfo *cipherSuite, uint16_t minVersion, uint16_t maxVersion, TlsTransportProtocol transportProtocol)
 Check whether a cipher suite can be used with a given protocol version. More...
 
uint_t tlsGetCipherSuiteType (uint16_t identifier)
 Retrieve the cipher suite type for a given identifier. More...
 

Variables

const TlsCipherSuiteInfo tlsSupportedCipherSuites []
 

Detailed Description

TLS cipher suites.

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneSSL Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.4.4

Definition in file tls_cipher_suites.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   TLS_TRACE_LEVEL

Definition at line 32 of file tls_cipher_suites.c.

Function Documentation

◆ tlsGetCipherSuiteName()

const char_t* tlsGetCipherSuiteName ( uint16_t  identifier)

Convert cipher suite identifier to string representation.

Parameters
[in]identifierCipher suite identifier
Returns
Cipher suite name

Definition at line 1227 of file tls_cipher_suites.c.

◆ tlsGetCipherSuiteType()

uint_t tlsGetCipherSuiteType ( uint16_t  identifier)

Retrieve the cipher suite type for a given identifier.

Parameters
[in]identifierCipher suite identifier
Returns
Cipher suite type

Definition at line 1321 of file tls_cipher_suites.c.

◆ tlsGetNumSupportedCipherSuites()

uint_t tlsGetNumSupportedCipherSuites ( void  )

Determine the number of cipher suites supported.

Returns
Number of supported cipher suites

Definition at line 1214 of file tls_cipher_suites.c.

◆ tlsIsCipherSuiteAcceptable()

bool_t tlsIsCipherSuiteAcceptable ( const TlsCipherSuiteInfo cipherSuite,
uint16_t  minVersion,
uint16_t  maxVersion,
TlsTransportProtocol  transportProtocol 
)

Check whether a cipher suite can be used with a given protocol version.

Parameters
[in]cipherSuiteCipher suite
[in]minVersionMinimum TLS protocol version
[in]maxVersionMaximum TLS protocol version
[in]transportProtocolTransport protocol (TLS or DTLS)
Returns
TRUE if the cipher suite is acceptable, else FALSE

Definition at line 1257 of file tls_cipher_suites.c.

Variable Documentation

◆ tlsSupportedCipherSuites

const TlsCipherSuiteInfo tlsSupportedCipherSuites[]

Definition at line 45 of file tls_cipher_suites.c.