blob: 62a928e87fc3f17acdb69e756fa12ee836c19108 [file] [log] [blame]
Paul Bakker68884e32013-01-07 18:20:04 +01001/**
2 * \file ssl_ciphersuites.h
3 *
4 * \brief SSL Ciphersuites for PolarSSL
5 *
6 * Copyright (C) 2006-2013, Brainspark B.V.
7 *
8 * This file is part of PolarSSL (http://www.polarssl.org)
9 * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
10 *
11 * All rights reserved.
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 */
27#ifndef POLARSSL_SSL_CIPHERSUITES_H
28#define POLARSSL_SSL_CIPHERSUITES_H
29
30#include "cipher.h"
31#include "md.h"
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
37typedef enum {
38 POLARSSL_KEY_EXCHANGE_NONE = 0,
39 POLARSSL_KEY_EXCHANGE_RSA,
40 POLARSSL_KEY_EXCHANGE_DHE_RSA
41} key_exchange_type_t;
42
43typedef struct _ssl_ciphersuite_t ssl_ciphersuite_t;
44
45#define POLARSSL_CIPHERSUITE_WEAK 0x01
46
47/**
48 * \brief This structure is used for storing ciphersuite information
49 */
50struct _ssl_ciphersuite_t
51{
52 int id;
53 const char * name;
54
55 cipher_type_t cipher;
56 md_type_t mac;
57 key_exchange_type_t key_exchange;
58
59 int min_major_ver;
60 int min_minor_ver;
61 int max_major_ver;
62 int max_minor_ver;
63
64 unsigned char flags;
65};
66
67const int *ssl_ciphersuites_list( void );
68
69const ssl_ciphersuite_t *ssl_ciphersuite_from_string( const char *ciphersuite_name );
70const ssl_ciphersuite_t *ssl_ciphersuite_from_id( int ciphersuite_id );
71
72#ifdef __cplusplus
73}
74#endif
75
76#endif /* ssl_ciphersuites.h */