Guile: Fix `x509-certificate-dn-oid' and related functions.
[gnutls.git] / lib / auth_srp.h
blob3caa3896400365d433c1a427166652402f0a0940
1 /*
2 * Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation
4 * Author: Nikos Mavroyanopoulos
6 * This file is part of GNUTLS.
8 * The GNUTLS library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; either version 2.1 of
11 * the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
21 * USA
25 #ifndef AUTH_SRP_H
26 # define AUTH_SRP_H
28 #include <gnutls_auth.h>
30 typedef struct gnutls_srp_client_credentials_st
32 char *username;
33 char *password;
34 gnutls_srp_client_credentials_function *get_function;
35 } srp_client_credentials_st;
37 typedef struct gnutls_srp_server_credentials_st
39 char *password_file;
40 char *password_conf_file;
41 /* callback function, instead of reading the
42 * password files.
44 gnutls_srp_server_credentials_function *pwd_callback;
45 } srp_server_cred_st;
47 /* these structures should not use allocated data */
48 typedef struct srp_server_auth_info_st
50 char username[MAX_SRP_USERNAME + 1];
51 } *srp_server_auth_info_t;
53 extern const gnutls_datum_t gnutls_srp_1024_group_prime;
54 extern const gnutls_datum_t gnutls_srp_1024_group_generator;
55 extern const gnutls_datum_t gnutls_srp_1536_group_prime;
56 extern const gnutls_datum_t gnutls_srp_1536_group_generator;
57 extern const gnutls_datum_t gnutls_srp_2048_group_prime;
58 extern const gnutls_datum_t gnutls_srp_2048_group_generator;
61 #ifdef ENABLE_SRP
63 int _gnutls_proc_srp_server_hello (gnutls_session_t state,
64 const opaque * data, size_t data_size);
65 int _gnutls_gen_srp_server_hello (gnutls_session_t state, opaque * data,
66 size_t data_size);
68 int _gnutls_gen_srp_server_kx (gnutls_session_t, opaque **);
69 int _gnutls_gen_srp_client_kx (gnutls_session_t, opaque **);
71 int _gnutls_proc_srp_server_kx (gnutls_session_t, opaque *, size_t);
72 int _gnutls_proc_srp_client_kx (gnutls_session_t, opaque *, size_t);
74 typedef struct srp_server_auth_info_st srp_server_auth_info_st;
76 #endif /* ENABLE_SRP */
78 #endif