2
* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2008, 2009 Free Software Foundation
2
* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2010 Free
3
* Software Foundation, Inc.
4
5
* Author: Nikos Mavrogiannopoulos
6
* This file is part of GNUTLS.
7
* This file is part of GnuTLS.
8
* The GNUTLS library is free software; you can redistribute it and/or
9
* The GnuTLS is free software; you can redistribute it and/or
9
10
* modify it under the terms of the GNU Lesser General Public License
10
11
* as published by the Free Software Foundation; either version 2.1 of
11
12
* the License, or (at your option) any later version.
41
* gnutls_credentials_clear - Clears all the credentials previously set
42
* @session: is a #gnutls_session_t structure.
44
* Clears all the credentials previously set in this session.
42
* gnutls_credentials_clear:
43
* @session: is a #gnutls_session_t structure.
45
* Clears all the credentials previously set in this session.
48
48
gnutls_credentials_clear (gnutls_session_t session)
66
66
* { algorithm, credentials, pointer to next }
69
* gnutls_credentials_set - Sets the needed credentials for the specified authentication algorithm.
69
* gnutls_credentials_set:
70
70
* @session: is a #gnutls_session_t structure.
71
71
* @type: is the type of the credentials
72
72
* @cred: is a pointer to a structure.
158
* gnutls_auth_get_type - Returns the type of credentials for the current authentication schema.
159
* @session: is a #gnutls_session_t structure.
161
* Returns type of credentials for the current authentication schema.
162
* The returned information is to be used to distinguish the function used
163
* to access authentication data.
165
* Eg. for CERTIFICATE ciphersuites (key exchange algorithms:
166
* %GNUTLS_KX_RSA, %GNUTLS_KX_DHE_RSA), the same function are to be
167
* used to access the authentication data.
169
* Returns: The type of credentials for the current authentication
170
* schema, a #gnutls_credentials_type_t type.
158
* gnutls_auth_get_type:
159
* @session: is a #gnutls_session_t structure.
161
* Returns type of credentials for the current authentication schema.
162
* The returned information is to be used to distinguish the function used
163
* to access authentication data.
165
* Eg. for CERTIFICATE ciphersuites (key exchange algorithms:
166
* %GNUTLS_KX_RSA, %GNUTLS_KX_DHE_RSA), the same function are to be
167
* used to access the authentication data.
169
* Returns: The type of credentials for the current authentication
170
* schema, a #gnutls_credentials_type_t type.
172
172
gnutls_credentials_type_t
173
173
gnutls_auth_get_type (gnutls_session_t session)
181
181
_gnutls_map_kx_get_cred (_gnutls_cipher_suite_get_kx_algo
182
(&session->security_parameters.
183
current_cipher_suite), server);
183
security_parameters.current_cipher_suite),
187
* gnutls_auth_server_get_type - Returns the type of credentials for the server authentication schema.
188
* @session: is a #gnutls_session_t structure.
190
* Returns the type of credentials that were used for server authentication.
191
* The returned information is to be used to distinguish the function used
192
* to access authentication data.
194
* Returns: The type of credentials for the server authentication
195
* schema, a #gnutls_credentials_type_t type.
188
* gnutls_auth_server_get_type:
189
* @session: is a #gnutls_session_t structure.
191
* Returns the type of credentials that were used for server authentication.
192
* The returned information is to be used to distinguish the function used
193
* to access authentication data.
195
* Returns: The type of credentials for the server authentication
196
* schema, a #gnutls_credentials_type_t type.
197
198
gnutls_credentials_type_t
198
199
gnutls_auth_server_get_type (gnutls_session_t session)
201
202
_gnutls_map_kx_get_cred (_gnutls_cipher_suite_get_kx_algo
202
(&session->security_parameters.
203
current_cipher_suite), 1);
204
security_parameters.current_cipher_suite), 1);
207
* gnutls_auth_client_get_type - Returns the type of credentials for the client authentication schema.
208
* @session: is a #gnutls_session_t structure.
210
* Returns the type of credentials that were used for client authentication.
211
* The returned information is to be used to distinguish the function used
212
* to access authentication data.
214
* Returns: The type of credentials for the client authentication
215
* schema, a #gnutls_credentials_type_t type.
208
* gnutls_auth_client_get_type:
209
* @session: is a #gnutls_session_t structure.
211
* Returns the type of credentials that were used for client authentication.
212
* The returned information is to be used to distinguish the function used
213
* to access authentication data.
215
* Returns: The type of credentials for the client authentication
216
* schema, a #gnutls_credentials_type_t type.
217
218
gnutls_credentials_type_t
218
219
gnutls_auth_client_get_type (gnutls_session_t session)
221
222
_gnutls_map_kx_get_cred (_gnutls_cipher_suite_get_kx_algo
222
(&session->security_parameters.
223
current_cipher_suite), 0);
224
security_parameters.current_cipher_suite), 0);
273
* _gnutls_get_auth_info - Returns a pointer to authentication information.
274
* @session: is a #gnutls_session_t structure.
276
* This function must be called after a succesful gnutls_handshake().
277
* Returns a pointer to authentication information. That information
278
* is data obtained by the handshake protocol, the key exchange algorithm,
279
* and the TLS extensions messages.
281
* In case of GNUTLS_CRD_ANON returns a type of &anon_(server/client)_auth_info_t;
282
* In case of GNUTLS_CRD_CERTIFICATE returns a type of &cert_auth_info_t;
283
* In case of GNUTLS_CRD_SRP returns a type of &srp_(server/client)_auth_info_t;
274
* _gnutls_get_auth_info - Returns a pointer to authentication information.
275
* @session: is a #gnutls_session_t structure.
277
* This function must be called after a successful gnutls_handshake().
278
* Returns a pointer to authentication information. That information
279
* is data obtained by the handshake protocol, the key exchange algorithm,
280
* and the TLS extensions messages.
282
* In case of GNUTLS_CRD_ANON returns a type of &anon_(server/client)_auth_info_t;
283
* In case of GNUTLS_CRD_CERTIFICATE returns a type of &cert_auth_info_t;
284
* In case of GNUTLS_CRD_SRP returns a type of &srp_(server/client)_auth_info_t;
286
287
_gnutls_get_auth_info (gnutls_session_t session)
292
* _gnutls_free_auth_info - Frees the auth info structure
293
* @session: is a #gnutls_session_t structure.
295
* This function frees the auth info structure and sets it to
296
* null. It must be called since some structures contain malloced
293
* _gnutls_free_auth_info - Frees the auth info structure
294
* @session: is a #gnutls_session_t structure.
296
* This function frees the auth info structure and sets it to
297
* null. It must be called since some structures contain malloced
300
301
_gnutls_free_auth_info (gnutls_session_t session)