1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * Copyright (C) 2003-2006 Imendio AB
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public License as
7  * published by the Free Software Foundation; either version 2 of the
8  * License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this program; if not, see <https://www.gnu.org/licenses>
17  */
18 
19 #ifndef __LM_SSL_INTERNALS_H__
20 #define __LM_SSL_INTERNALS_H__
21 
22 #include <glib.h>
23 
24 LmSSLResponse   _lm_ssl_func_always_continue (LmSSL       *ssl,
25                                               LmSSLStatus  status,
26                                               gpointer     user_data);
27 LmSSL *          _lm_ssl_new              (const gchar    *expected_fingerprint,
28                                            LmSSLFunction   ssl_function,
29                                            gpointer        user_data,
30                                            GDestroyNotify  notify);
31 
32 void             _lm_ssl_initialize       (LmSSL            *ssl);
33 gboolean         _lm_ssl_set_ca           (LmSSL            *ssl,
34                                            const gchar    *ca_path);
35 gboolean         _lm_ssl_begin            (LmSSL            *ssl,
36                                            gint              fd,
37                                            const gchar      *server,
38                                            GError          **error);
39 GIOStatus        _lm_ssl_read             (LmSSL            *ssl,
40                                            gchar            *buf,
41                                            gint              len,
42                                            gsize             *bytes_read);
43 gint             _lm_ssl_send             (LmSSL            *ssl,
44                                            const gchar      *str,
45                                            gint              len);
46 void             _lm_ssl_close            (LmSSL            *ssl);
47 void             _lm_ssl_free             (LmSSL            *ssl);
48 
49 #endif /* __LM_SSL_INTERNALS_H__ */
50