TLS session tickets. More...
Go to the source code of this file.
Macros | |
#define | TRACE_LEVEL TLS_TRACE_LEVEL |
Functions | |
error_t | tlsInitTicketContext (TlsTicketContext *ticketContext) |
Initialize ticket encryption context. More... | |
error_t | tlsEncryptTicket (TlsContext *context, const uint8_t *plaintext, size_t plaintextLen, uint8_t *ciphertext, size_t *ciphertextLen, void *param) |
Session ticket encryption. More... | |
error_t | tlsDecryptTicket (TlsContext *context, const uint8_t *ciphertext, size_t ciphertextLen, uint8_t *plaintext, size_t *plaintextLen, void *param) |
Session ticket decryption. More... | |
error_t | tlsGenerateTicketKeys (TlsTicketContext *ticketContext, const PrngAlgo *prngAlgo, void *prngContext) |
Generate a new set of keys. More... | |
void | tlsCheckTicketKeyLifetime (TlsTicketEncryptionState *state) |
Check the validity of a given set of keys. More... | |
bool_t | tlsCompareTicketKeyName (const uint8_t *ticket, size_t ticketLen, const TlsTicketEncryptionState *state) |
Key name comparison. More... | |
void | tlsFreeTicketContext (TlsTicketContext *ticketContext) |
Properly dispose ticket encryption context. More... | |
Detailed Description
TLS session tickets.
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.
- Version
- 2.4.4
Definition in file tls_ticket.c.
Macro Definition Documentation
◆ TRACE_LEVEL
#define TRACE_LEVEL TLS_TRACE_LEVEL |
Definition at line 32 of file tls_ticket.c.
Function Documentation
◆ tlsCheckTicketKeyLifetime()
void tlsCheckTicketKeyLifetime | ( | TlsTicketEncryptionState * | state | ) |
Check the validity of a given set of keys.
- Parameters
-
[in] state Pointer to ticket encryption state
Definition at line 387 of file tls_ticket.c.
◆ tlsCompareTicketKeyName()
bool_t tlsCompareTicketKeyName | ( | const uint8_t * | ticket, |
size_t | ticketLen, | ||
const TlsTicketEncryptionState * | state | ||
) |
Key name comparison.
- Parameters
-
[in] ticket Encrypted ticket [in] ticketLen Length of the encrypted ticket, in bytes [in] state Pointer to ticket encryption state
Definition at line 414 of file tls_ticket.c.
◆ tlsDecryptTicket()
error_t tlsDecryptTicket | ( | TlsContext * | context, |
const uint8_t * | ciphertext, | ||
size_t | ciphertextLen, | ||
uint8_t * | plaintext, | ||
size_t * | plaintextLen, | ||
void * | param | ||
) |
Session ticket decryption.
- Parameters
-
[in] context Pointer to the TLS context [in] ciphertext Encrypted ticket [in] ciphertextLen Length of the encrypted ticket, in bytes [out] plaintext Plaintext session state [out] plaintextLen Length of the plaintext session state, in bytes [in] param Pointer to the ticket encryption context
- Returns
- Error code
Definition at line 221 of file tls_ticket.c.
◆ tlsEncryptTicket()
error_t tlsEncryptTicket | ( | TlsContext * | context, |
const uint8_t * | plaintext, | ||
size_t | plaintextLen, | ||
uint8_t * | ciphertext, | ||
size_t * | ciphertextLen, | ||
void * | param | ||
) |
Session ticket encryption.
- Parameters
-
[in] context Pointer to the TLS context [in] plaintext Plaintext session state [in] plaintextLen Length of the plaintext session state, in bytes [out] ciphertext Encrypted ticket [out] ciphertextLen Length of the encrypted ticket, in bytes [in] param Pointer to the ticket encryption context
- Returns
- Error code
Definition at line 81 of file tls_ticket.c.
◆ tlsFreeTicketContext()
void tlsFreeTicketContext | ( | TlsTicketContext * | ticketContext | ) |
Properly dispose ticket encryption context.
- Parameters
-
[in] ticketContext Pointer to ticket encryption context to be released
Definition at line 448 of file tls_ticket.c.
◆ tlsGenerateTicketKeys()
error_t tlsGenerateTicketKeys | ( | TlsTicketContext * | ticketContext, |
const PrngAlgo * | prngAlgo, | ||
void * | prngContext | ||
) |
Generate a new set of keys.
- Parameters
-
[in] ticketContext Pointer to ticket encryption context [in] prngAlgo PRNG algorithm [in] prngContext Pointer to the PRNG context
- Returns
- Error code
Definition at line 346 of file tls_ticket.c.
◆ tlsInitTicketContext()
error_t tlsInitTicketContext | ( | TlsTicketContext * | ticketContext | ) |
Initialize ticket encryption context.
- Parameters
-
[in] ticketContext Pointer to ticket encryption context
- Returns
- Error code
Definition at line 49 of file tls_ticket.c.