ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/tls_none.c
Revision: 7296
Committed: Tue Feb 9 19:34:49 2016 UTC (9 years, 6 months ago) by michael
Content type: text/x-csrc
File size: 2043 byte(s)
Log Message:
- tls_none.c:tls_new_cred(): return 1 if no tls support is available so conf_handle_tls() doesn't exit the process

File Contents

# User Rev Content
1 michael 7105 /*
2     * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3     *
4 michael 7164 * Copyright (c) 2015 Attila Molnar <attilamolnar@hush.com>
5     * Copyright (c) 2015 Adam <Adam@anope.org>
6 michael 7105 * Copyright (c) 2015-2016 ircd-hybrid development team
7     *
8     * This program is free software; you can redistribute it and/or modify
9     * it under the terms of the GNU General Public License as published by
10     * the Free Software Foundation; either version 2 of the License, or
11     * (at your option) any later version.
12     *
13     * This program is distributed in the hope that it will be useful,
14     * but WITHOUT ANY WARRANTY; without even the implied warranty of
15     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16     * GNU General Public License for more details.
17     *
18     * You should have received a copy of the GNU General Public License
19     * along with this program; if not, write to the Free Software
20     * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
21     * USA
22     */
23    
24     /*! \file tls_none.c
25     * \brief Dummy file for no TLS support
26     * \version $Id$
27     */
28    
29     #include "stdinc.h"
30     #include "tls.h"
31    
32     #ifndef HAVE_TLS
33    
34 michael 7271 int
35     tls_is_initialized(void)
36     {
37     return 0;
38     }
39    
40 michael 7105 void
41     tls_init(void)
42     {
43     }
44    
45     int
46     tls_new_cred(void)
47     {
48 michael 7296 return 1;
49 michael 7105 }
50    
51     const char *
52     tls_get_cipher(const tls_data_t *tls_data)
53     {
54     return NULL;
55     }
56    
57     int
58     tls_isusing(tls_data_t *tls_data)
59     {
60     return 0;
61     }
62    
63     void
64     tls_free(tls_data_t *tls_data)
65     {
66     }
67    
68     int
69     tls_read(tls_data_t *tls_data, char *buf, size_t bufsize, int *want_write)
70     {
71     return -1;
72     }
73    
74     int
75     tls_write(tls_data_t *tls_data, const char *buf, size_t bufsize, int *want_read)
76     {
77     return -1;
78     }
79    
80     void
81     tls_shutdown(tls_data_t *tls_data)
82     {
83     }
84    
85     int
86     tls_new(tls_data_t *tls_data, int fd, tls_role_t role)
87     {
88     return 0;
89     }
90    
91 michael 7275 tls_handshake_status_t
92     tls_handshake(tls_data_t *tls_data, tls_role_t role, const char **errstr)
93     {
94     return 0;
95     }
96    
97 michael 7105 int
98     tls_set_ciphers(tls_data_t *tls_data, const char *cipher_list)
99     {
100     return 0;
101     }
102    
103     int
104 michael 7142 tls_verify_cert(tls_data_t *tls_data, tls_md_t digest, char **fingerprint)
105 michael 7105 {
106     return 0;
107     }
108     #endif /* HAVE_TLS */

Properties

Name Value
svn:eol-style native
svn:keywords Id Revision