2 Copyright (C) 2008 Ben Kibbey <bjk@luxsci.net>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02110-1301 USA
21 #include <gnutls/gnutls.h>
31 gnutls_dh_params_t dh_params
;
32 gnutls_rsa_params_t rsa_params
;
33 gnutls_certificate_credentials_t x509_cred
;
35 struct tls_s
*tls_init(int fd
, const char *prio
);
36 int tls_get_params(gnutls_session_t ses
, gnutls_params_type_t type
,
37 gnutls_params_st
*st
);
38 void tls_log(int level
, const char *msg
);
39 ssize_t
tls_read_hook(assuan_context_t ctx
, assuan_fd_t fd
, void *data
,
41 ssize_t
tls_write_hook(assuan_context_t ctx
, assuan_fd_t fd
, const void *data
,
43 void tls_deinit_params();
44 gpg_error_t
tls_init_params();
45 gpg_error_t
tls_validate_access(struct client_s
*client
, const char *filename
);