ssl_ciphersuites.c File Reference

SSL ciphersuites for PolarSSL. More...

#include "polarssl/config.h"
#include "polarssl/ssl_ciphersuites.h"
#include "polarssl/ssl.h"
#include <stdlib.h>
Include dependency graph for ssl_ciphersuites.c:

Go to the source code of this file.

Defines

#define MAX_CIPHERSUITES   128

Functions

const int * ssl_list_ciphersuites (void)
 Returns the list of ciphersuites supported by the SSL/TLS module.
const ssl_ciphersuite_tssl_ciphersuite_from_string (const char *ciphersuite_name)
const ssl_ciphersuite_tssl_ciphersuite_from_id (int ciphersuite)
const char * ssl_get_ciphersuite_name (const int ciphersuite_id)
 Return the name of the ciphersuite associated with the given ID.
int ssl_get_ciphersuite_id (const char *ciphersuite_name)
 Return the ID of the ciphersuite associated with the given name.
pk_type_t ssl_get_ciphersuite_sig_pk_alg (const ssl_ciphersuite_t *info)
int ssl_ciphersuite_uses_ec (const ssl_ciphersuite_t *info)
int ssl_ciphersuite_uses_psk (const ssl_ciphersuite_t *info)

Variables

static const int ciphersuite_preference []
static int supported_ciphersuites [MAX_CIPHERSUITES]
static int supported_init = 0
static const ssl_ciphersuite_t ciphersuite_definitions []

Detailed Description

SSL ciphersuites for PolarSSL.

Copyright (C) 2006-2013, Brainspark B.V.

This file is part of PolarSSL (http://www.polarssl.org) Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>

All rights reserved.

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.

Definition in file ssl_ciphersuites.c.


Define Documentation

#define MAX_CIPHERSUITES   128

Definition at line 211 of file ssl_ciphersuites.c.


Function Documentation

const ssl_ciphersuite_t* ssl_ciphersuite_from_id ( int  ciphersuite  ) 
const ssl_ciphersuite_t* ssl_ciphersuite_from_string ( const char *  ciphersuite_name  ) 

Definition at line 1308 of file ssl_ciphersuites.c.

References _ssl_ciphersuite_t::id, and _ssl_ciphersuite_t::name.

Referenced by ssl_get_ciphersuite_id().

int ssl_ciphersuite_uses_ec ( const ssl_ciphersuite_t info  ) 
int ssl_ciphersuite_uses_psk ( const ssl_ciphersuite_t info  ) 
int ssl_get_ciphersuite_id ( const char *  ciphersuite_name  ) 

Return the ID of the ciphersuite associated with the given name.

Parameters:
ciphersuite_name SSL ciphersuite name
Returns:
the ID with the ciphersuite or 0 if not found

Definition at line 1353 of file ssl_ciphersuites.c.

References _ssl_ciphersuite_t::id, and ssl_ciphersuite_from_string().

const char* ssl_get_ciphersuite_name ( const int  ciphersuite_id  ) 

Return the name of the ciphersuite associated with the given ID.

Parameters:
ciphersuite_id SSL ciphersuite ID
Returns:
a string containing the ciphersuite name

Definition at line 1341 of file ssl_ciphersuites.c.

References _ssl_ciphersuite_t::name, and ssl_ciphersuite_from_id().

Referenced by ssl_derive_keys(), ssl_get_ciphersuite(), and ssl_write_server_hello().

pk_type_t ssl_get_ciphersuite_sig_pk_alg ( const ssl_ciphersuite_t info  ) 
const int* ssl_list_ciphersuites ( void   ) 

Returns the list of ciphersuites supported by the SSL/TLS module.

Returns:
a statically allocated array of ciphersuites, the last entry is 0.

Definition at line 1282 of file ssl_ciphersuites.c.

References ciphersuite_preference, ssl_ciphersuite_from_id(), supported_ciphersuites, and supported_init.

Referenced by ssl_init().


Variable Documentation

Definition at line 215 of file ssl_ciphersuites.c.

const int ciphersuite_preference[] [static]

Definition at line 54 of file ssl_ciphersuites.c.

Referenced by ssl_list_ciphersuites().

int supported_ciphersuites[MAX_CIPHERSUITES] [static]

Definition at line 212 of file ssl_ciphersuites.c.

Referenced by ssl_list_ciphersuites().

int supported_init = 0 [static]

Definition at line 213 of file ssl_ciphersuites.c.

Referenced by ssl_list_ciphersuites().


Generated on 9 Apr 2014 for PolarSSL v1.3.2 by  doxygen 1.6.1