Add `gnutls/dtls.h' to the distribution.
[gnutls.git] / lib / gnutls_auth.h
blob71c27f09e40f59de1cb3313f57849a17625d342c
1 /*
2 * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2010 Free
3 * Software Foundation, Inc.
5 * Author: Nikos Mavrogiannopoulos
7 * This file is part of GnuTLS.
9 * The GnuTLS is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public License
11 * as published by the Free Software Foundation; either version 2.1 of
12 * the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22 * USA
26 #ifndef GNUTLS_AUTH_H
27 #define GNUTLS_AUTH_H
29 #include <gnutls_str.h>
31 typedef struct mod_auth_st_int
33 const char *name; /* null terminated */
34 int (*gnutls_generate_server_certificate) (gnutls_session_t, gnutls_buffer_st*);
35 int (*gnutls_generate_client_certificate) (gnutls_session_t, gnutls_buffer_st*);
36 int (*gnutls_generate_server_kx) (gnutls_session_t, gnutls_buffer_st*);
37 int (*gnutls_generate_client_kx) (gnutls_session_t, gnutls_buffer_st*); /* used in SRP */
38 int (*gnutls_generate_client_cert_vrfy) (gnutls_session_t, gnutls_buffer_st *);
39 int (*gnutls_generate_server_certificate_request) (gnutls_session_t,
40 gnutls_buffer_st *);
42 int (*gnutls_process_server_certificate) (gnutls_session_t, opaque *,
43 size_t);
44 int (*gnutls_process_client_certificate) (gnutls_session_t, opaque *,
45 size_t);
46 int (*gnutls_process_server_kx) (gnutls_session_t, opaque *, size_t);
47 int (*gnutls_process_client_kx) (gnutls_session_t, opaque *, size_t);
48 int (*gnutls_process_client_cert_vrfy) (gnutls_session_t, opaque *, size_t);
49 int (*gnutls_process_server_certificate_request) (gnutls_session_t,
50 opaque *, size_t);
51 } mod_auth_st;
53 const void *_gnutls_get_cred (gnutls_key_st key,
54 gnutls_credentials_type_t kx, int *err);
55 const void *_gnutls_get_kx_cred (gnutls_session_t session,
56 gnutls_kx_algorithm_t algo, int *err);
57 void *_gnutls_get_auth_info (gnutls_session_t session);
58 int _gnutls_auth_info_set (gnutls_session_t session,
59 gnutls_credentials_type_t type, int size,
60 int allow_change);
62 #endif