Webserver+3d print
tls_common.h File Reference
Handshake message processing (TLS client and server) More...
Go to the source code of this file.
Functions | |
error_t | tlsHandshake (TlsContext *context) |
Perform TLS handshake. | |
error_t | tlsSendCertificate (TlsContext *context) |
Send Certificate message. | |
error_t | tlsSendChangeCipherSpec (TlsContext *context) |
Send ChangeCipherSpec message. | |
error_t | tlsSendFinished (TlsContext *context) |
Send Finished message. | |
error_t | tlsSendAlert (TlsContext *context, uint8_t level, uint8_t description) |
Send Alert message. | |
error_t | tlsFormatCertificate (TlsContext *context, TlsCertificate *message, size_t *length) |
Format Certificate message. | |
error_t | tlsFormatChangeCipherSpec (TlsContext *context, TlsChangeCipherSpec *message, size_t *length) |
Format ChangeCipherSpec message. | |
error_t | tlsFormatFinished (TlsContext *context, TlsFinished *message, size_t *length) |
Format Finished message. | |
error_t | tlsFormatAlert (TlsContext *context, uint8_t level, uint8_t description, TlsAlert *message, size_t *length) |
Format Alert message. | |
error_t | tlsParseCertificate (TlsContext *context, const TlsCertificate *message, size_t length) |
Parse Certificate message. | |
error_t | tlsParseChangeCipherSpec (TlsContext *context, const TlsChangeCipherSpec *message, size_t length) |
Parse ChangeCipherSpec message. | |
error_t | tlsParseFinished (TlsContext *context, const TlsFinished *message, size_t length) |
Parse Finished message. | |
error_t | tlsParseAlert (TlsContext *context, const TlsAlert *message, size_t length) |
Parse Alert message. |
Detailed Description
Handshake message processing (TLS client and server)
License
Copyright (C) 2010-2017 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.
- Version:
- 1.7.6
Definition in file tls_common.h.
Function Documentation
error_t tlsFormatAlert | ( | TlsContext * | context, |
uint8_t | level, | ||
uint8_t | description, | ||
TlsAlert * | message, | ||
size_t * | length | ||
) |
Format Alert message.
- Parameters:
-
[in] context Pointer to the TLS context [in] level Severity of the message (warning or fatal) [in] description Description of the alert [out] message Buffer where to format the Alert message [out] length Length of the resulting Alert message
- Returns:
- Error code
Definition at line 566 of file tls_common.c.
error_t tlsFormatCertificate | ( | TlsContext * | context, |
TlsCertificate * | message, | ||
size_t * | length | ||
) |
Format Certificate message.
- Parameters:
-
[in] context Pointer to the TLS context [out] message Buffer where to format the Certificate message [out] length Length of the resulting Certificate message
- Returns:
- Error code
Definition at line 410 of file tls_common.c.
error_t tlsFormatChangeCipherSpec | ( | TlsContext * | context, |
TlsChangeCipherSpec * | message, | ||
size_t * | length | ||
) |
Format ChangeCipherSpec message.
- Parameters:
-
[in] context Pointer to the TLS context [out] message Buffer where to format the ChangeCipherSpec message [out] length Length of the resulting ChangeCipherSpec message
- Returns:
- Error code
Definition at line 514 of file tls_common.c.
error_t tlsFormatFinished | ( | TlsContext * | context, |
TlsFinished * | message, | ||
size_t * | length | ||
) |
Format Finished message.
- Parameters:
-
[in] context Pointer to the TLS context [out] message Buffer where to format the Finished message [out] length Length of the resulting Finished message
- Returns:
- Error code
Definition at line 536 of file tls_common.c.
error_t tlsHandshake | ( | TlsContext * | context ) |
Perform TLS handshake.
- Parameters:
-
[in] context Pointer to the TLS context
- Returns:
- Error code
Definition at line 59 of file tls_common.c.
error_t tlsParseAlert | ( | TlsContext * | context, |
const TlsAlert * | message, | ||
size_t | length | ||
) |
Parse Alert message.
- Parameters:
-
[in] context Pointer to the TLS context [in] message Incoming Alert message to parse [in] length Message length
- Returns:
- Error code
Definition at line 1168 of file tls_common.c.
error_t tlsParseCertificate | ( | TlsContext * | context, |
const TlsCertificate * | message, | ||
size_t | length | ||
) |
Parse Certificate message.
- Parameters:
-
[in] context Pointer to the TLS context [in] message Incoming Certificate message to parse [in] length Message length
- Returns:
- Error code
Definition at line 590 of file tls_common.c.
error_t tlsParseChangeCipherSpec | ( | TlsContext * | context, |
const TlsChangeCipherSpec * | message, | ||
size_t | length | ||
) |
Parse ChangeCipherSpec message.
- Parameters:
-
[in] context Pointer to the TLS context [in] message Incoming ChangeCipherSpec message to parse [in] length Message length
- Returns:
- Error code
Definition at line 1033 of file tls_common.c.
error_t tlsParseFinished | ( | TlsContext * | context, |
const TlsFinished * | message, | ||
size_t | length | ||
) |
Parse Finished message.
- Parameters:
-
[in] context Pointer to the TLS context [in] message Incoming Finished message to parse [in] length Message length
- Returns:
- Error code
Definition at line 1088 of file tls_common.c.
error_t tlsSendAlert | ( | TlsContext * | context, |
uint8_t | level, | ||
uint8_t | description | ||
) |
Send Alert message.
- Parameters:
-
[in] context Pointer to the TLS context [in] level Severity of the message (warning or fatal) [in] description Description of the alert
- Returns:
- Error code
Definition at line 342 of file tls_common.c.
error_t tlsSendCertificate | ( | TlsContext * | context ) |
Send Certificate message.
- Parameters:
-
[in] context Pointer to the TLS context
- Returns:
- Error code
Definition at line 98 of file tls_common.c.
error_t tlsSendChangeCipherSpec | ( | TlsContext * | context ) |
Send ChangeCipherSpec message.
The change cipher spec message is sent by both the client and the server to notify the receiving party that subsequent records will be protected under the newly negotiated CipherSpec and keys
- Parameters:
-
[in] context Pointer to the TLS context
- Returns:
- Error code
Definition at line 214 of file tls_common.c.
error_t tlsSendFinished | ( | TlsContext * | context ) |
Send Finished message.
A Finished message is always sent immediately after a change cipher spec message to verify that the key exchange and authentication processes were successful. It is essential that a change cipher spec message be received between the other handshake messages and the Finished message
- Parameters:
-
[in] context Pointer to the TLS context
- Returns:
- Error code
Definition at line 276 of file tls_common.c.
Generated on Tue Jul 12 2022 17:10:23 by
