SSL ciphersuites for PolarSSL. More...
#include "polarssl/config.h"
#include "polarssl/ssl_ciphersuites.h"
#include "polarssl/ssl.h"
#include <stdlib.h>
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_t * | ssl_ciphersuite_from_string (const char *ciphersuite_name) |
const ssl_ciphersuite_t * | ssl_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 [] |
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 MAX_CIPHERSUITES 128 |
Definition at line 211 of file ssl_ciphersuites.c.
const ssl_ciphersuite_t* ssl_ciphersuite_from_id | ( | int | ciphersuite | ) |
Definition at line 1326 of file ssl_ciphersuites.c.
References _ssl_ciphersuite_t::id.
Referenced by ssl_get_ciphersuite_name(), ssl_list_ciphersuites(), ssl_parse_client_hello(), ssl_parse_client_hello_v2(), ssl_parse_server_hello(), and ssl_write_client_hello().
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 | ) |
Definition at line 1385 of file ssl_ciphersuites.c.
References _ssl_ciphersuite_t::key_exchange, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA, POLARSSL_KEY_EXCHANGE_ECDHE_PSK, and POLARSSL_KEY_EXCHANGE_ECDHE_RSA.
Referenced by ssl_parse_client_hello().
int ssl_ciphersuite_uses_psk | ( | const ssl_ciphersuite_t * | info | ) |
Definition at line 1399 of file ssl_ciphersuites.c.
References _ssl_ciphersuite_t::key_exchange, POLARSSL_KEY_EXCHANGE_DHE_PSK, POLARSSL_KEY_EXCHANGE_ECDHE_PSK, POLARSSL_KEY_EXCHANGE_PSK, and POLARSSL_KEY_EXCHANGE_RSA_PSK.
Referenced by ssl_parse_client_hello().
int ssl_get_ciphersuite_id | ( | const char * | ciphersuite_name | ) |
Return the ID of the ciphersuite associated with the given name.
ciphersuite_name | SSL ciphersuite name |
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.
ciphersuite_id | SSL ciphersuite ID |
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 | ) |
Definition at line 1366 of file ssl_ciphersuites.c.
References _ssl_ciphersuite_t::key_exchange, POLARSSL_KEY_EXCHANGE_DHE_RSA, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA, POLARSSL_KEY_EXCHANGE_ECDHE_RSA, POLARSSL_KEY_EXCHANGE_RSA, POLARSSL_KEY_EXCHANGE_RSA_PSK, POLARSSL_PK_ECDSA, POLARSSL_PK_NONE, and POLARSSL_PK_RSA.
Referenced by ssl_parse_server_key_exchange(), and ssl_pick_cert().
const int* ssl_list_ciphersuites | ( | void | ) |
Returns the list of ciphersuites supported by the SSL/TLS module.
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().
const ssl_ciphersuite_t ciphersuite_definitions[] [static] |
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().