2 * Copyright (C) 2000 Nikos Mavroyanopoulos
4 * This file is part of GNUTLS.
6 * GNUTLS is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * GNUTLS is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
21 #include "gnutls_auth.h"
23 /* functions for version */
25 GNUTLS_Version
_gnutls_version_lowest( GNUTLS_STATE state
);
26 GNUTLS_Version
_gnutls_version_max( GNUTLS_STATE state
);
27 int _gnutls_version_priority(GNUTLS_STATE state
, GNUTLS_Version version
);
28 int _gnutls_version_is_supported(GNUTLS_STATE state
, const GNUTLS_Version version
);
29 int _gnutls_version_get_major( GNUTLS_Version ver
);
30 int _gnutls_version_get_minor( GNUTLS_Version ver
);
31 GNUTLS_Version
_gnutls_version_get( int major
, int minor
);
33 /* functions for macs */
34 int _gnutls_mac_get_digest_size(MACAlgorithm algorithm
);
35 const char* gnutls_mac_get_name(MACAlgorithm algorithm
);
36 int _gnutls_mac_is_ok(MACAlgorithm algorithm
);
37 int _gnutls_mac_priority(GNUTLS_STATE state
, MACAlgorithm algorithm
);
38 int _gnutls_mac_count(void);
40 /* functions for cipher suites */
41 int _gnutls_supported_ciphersuites(GNUTLS_STATE state
, GNUTLS_CipherSuite
**ciphers
);
42 int _gnutls_supported_ciphersuites_sorted(GNUTLS_STATE state
, GNUTLS_CipherSuite
**ciphers
);
43 int _gnutls_supported_compression_methods(GNUTLS_STATE state
, uint8
**comp
);
45 const char* _gnutls_cipher_suite_get_name(GNUTLS_CipherSuite algorithm
);
46 BulkCipherAlgorithm
_gnutls_cipher_suite_get_cipher_algo(const GNUTLS_CipherSuite algorithm
);
47 KXAlgorithm
_gnutls_cipher_suite_get_kx_algo(const GNUTLS_CipherSuite algorithm
);
48 MACAlgorithm
_gnutls_cipher_suite_get_mac_algo(const GNUTLS_CipherSuite algorithm
);
49 GNUTLS_Version
_gnutls_cipher_suite_get_version(const GNUTLS_CipherSuite algorithm
);
50 GNUTLS_CipherSuite
_gnutls_cipher_suite_get_suite_name(GNUTLS_CipherSuite algorithm
);
52 /* functions for ciphers */
53 int _gnutls_cipher_priority(GNUTLS_STATE state
, BulkCipherAlgorithm algorithm
);
54 int _gnutls_cipher_get_block_size(BulkCipherAlgorithm algorithm
);
55 int _gnutls_cipher_is_block(BulkCipherAlgorithm algorithm
);
56 int _gnutls_cipher_count(void);
57 int _gnutls_cipher_is_ok(BulkCipherAlgorithm algorithm
);
58 int _gnutls_cipher_get_key_size(BulkCipherAlgorithm algorithm
);
59 int _gnutls_cipher_get_iv_size(BulkCipherAlgorithm algorithm
);
60 const char *gnutls_cipher_get_name(BulkCipherAlgorithm algorithm
);
62 /* functions for key exchange */
63 int _gnutls_kx_priority(GNUTLS_STATE state
, KXAlgorithm algorithm
);
65 MOD_AUTH_STRUCT
* _gnutls_kx_auth_struct(KXAlgorithm algorithm
);
66 const char *gnutls_kx_get_name(KXAlgorithm algorithm
);
67 int _gnutls_kx_is_ok(KXAlgorithm algorithm
);
68 int _gnutls_kx_count(void);
70 /* functions for compression */
71 int _gnutls_compression_priority(GNUTLS_STATE state
, CompressionMethod algorithm
);
72 int _gnutls_compression_is_ok(CompressionMethod algorithm
);
73 int _gnutls_compression_count(void);
74 int _gnutls_compression_get_num(CompressionMethod algorithm
);
75 CompressionMethod
_gnutls_compression_get_id(int num
);
76 const char *gnutls_compression_get_name(CompressionMethod algorithm
);
78 /* Type to KX mappings */
79 KXAlgorithm
_gnutls_map_kx_get_kx(CredType type
);
80 CredType
_gnutls_map_kx_get_cred(KXAlgorithm algorithm
);