Dependents:   Nucleo

Embed: (wiki syntax)

« Back to documentation index

tls_client_misc.h File Reference

tls_client_misc.h File Reference

Helper functions (TLS client) More...

Go to the source code of this file.

Functions

error_t tlsFormatPskIdentity (TlsContext *context, uint8_t *p, size_t *written)
 Format PSK identity.
error_t tlsFormatClientKeyParams (TlsContext *context, uint8_t *p, size_t *written)
 Format client's key exchange parameters.
error_t tlsParsePskIdentityHint (TlsContext *context, const uint8_t *p, size_t length, size_t *consumed)
 Parse PSK identity hint.
error_t tlsParseServerKeyParams (TlsContext *context, const uint8_t *p, size_t length, size_t *consumed)
 Parse server's key exchange parameters.
error_t tlsVerifyServerKeySignature (TlsContext *context, const uint8_t *p, size_t length, const uint8_t *params, size_t paramsLen, size_t *consumed)
 Verify signature over the server's key exchange parameters.

Detailed Description

Helper functions (TLS client)

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.

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

Definition in file tls_client_misc.h.


Function Documentation

error_t tlsFormatClientKeyParams ( TlsContext *  context,
uint8_t *  p,
size_t *  written 
)

Format client's key exchange parameters.

Parameters:
[in]contextPointer to the TLS context
[in]pOutput stream where to write the PSK identity hint
[out]writtenTotal number of bytes that have been written
Returns:
Error code

Definition at line 115 of file tls_client_misc.c.

error_t tlsFormatPskIdentity ( TlsContext *  context,
uint8_t *  p,
size_t *  written 
)

Format PSK identity.

Parameters:
[in]contextPointer to the TLS context
[in]pOutput stream where to write the PSK identity hint
[out]writtenTotal number of bytes that have been written
Returns:
Error code

Definition at line 56 of file tls_client_misc.c.

error_t tlsParsePskIdentityHint ( TlsContext *  context,
const uint8_t *  p,
size_t  length,
size_t *  consumed 
)

Parse PSK identity hint.

Parameters:
[in]contextPointer to the TLS context
[in]pInput stream where to read the PSK identity hint
[in]lengthNumber of bytes available in the input stream
[out]consumedTotal number of bytes that have been consumed
Returns:
Error code

Definition at line 288 of file tls_client_misc.c.

error_t tlsParseServerKeyParams ( TlsContext *  context,
const uint8_t *  p,
size_t  length,
size_t *  consumed 
)

Parse server's key exchange parameters.

Parameters:
[in]contextPointer to the TLS context
[in]pInput stream where to read the server's key exchange parameters
[in]lengthNumber of bytes available in the input stream
[out]consumedTotal number of bytes that have been consumed
Returns:
Error code

Definition at line 351 of file tls_client_misc.c.

error_t tlsVerifyServerKeySignature ( TlsContext *  context,
const uint8_t *  p,
size_t  length,
const uint8_t *  params,
size_t  paramsLen,
size_t *  consumed 
)

Verify signature over the server's key exchange parameters.

Parameters:
[in]contextPointer to the TLS context
[in]pInput stream where to read the signature
[in]lengthNumber of bytes available in the input stream
[in]paramsPointer to the server's key exchange parameters
[in]paramsLenLength of the server's key exchange parameters
[out]consumedTotal number of bytes that have been consumed
Returns:
Error code

Definition at line 567 of file tls_client_misc.c.