]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | * libratbox: a library used by ircd-ratbox and other things | |
3 | * nossl.c: ssl stub code | |
4 | * | |
5 | * Copyright (C) 2007-2008 ircd-ratbox development team | |
6 | * Copyright (C) 2007-2008 Aaron Sethman <androsyn@ratbox.org> | |
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 | * $Id: commio.c 24808 2008-01-02 08:17:05Z androsyn $ | |
24 | */ | |
25 | ||
26 | ||
27 | #include <libratbox_config.h> | |
28 | #include <ratbox_lib.h> | |
29 | ||
30 | #ifndef HAVE_OPENSSL | |
31 | ||
32 | #include <commio-int.h> | |
33 | #include <commio-ssl.h> | |
34 | ||
35 | int | |
36 | rb_setup_ssl_server(const char *cert, const char *keyfile, const char *dhfile) | |
37 | { | |
38 | errno = ENOSYS; | |
39 | return 0; | |
40 | } | |
41 | ||
42 | int | |
43 | rb_init_ssl(void) | |
44 | { | |
45 | errno = ENOSYS; | |
46 | return -1; | |
47 | ||
48 | } | |
49 | ||
50 | int | |
51 | rb_ssl_listen(rb_fde_t *F, int backlog) | |
52 | { | |
53 | errno = ENOSYS; | |
54 | return -1; | |
55 | } | |
56 | ||
57 | int rb_init_prng(const char *path, prng_seed_t seed_type) | |
58 | { | |
59 | return -1; | |
60 | } | |
61 | ||
62 | int | |
63 | rb_get_random(void *buf, size_t length) | |
64 | { | |
65 | return -1; | |
66 | } | |
67 | ||
68 | const char * | |
69 | rb_get_ssl_strerror(rb_fde_t *F) | |
70 | { | |
71 | static const char *nosupport = "SSL/TLS not supported"; | |
72 | return nosupport; | |
73 | } | |
74 | ||
75 | void | |
76 | rb_ssl_start_accepted(rb_fde_t *new_F, ACCB *cb, void *data, int timeout) | |
77 | { | |
78 | return; | |
79 | } | |
80 | ||
81 | void | |
82 | rb_ssl_start_connected(rb_fde_t *F, CNCB *callback, void *data, int timeout) | |
83 | { | |
84 | return; | |
85 | } | |
86 | ||
87 | void | |
88 | rb_connect_tcp_ssl(rb_fde_t *F, struct sockaddr *dest, | |
89 | struct sockaddr *clocal, int socklen, CNCB *callback, void *data, int timeout) | |
90 | { | |
91 | return; | |
92 | } | |
93 | ||
94 | int | |
95 | rb_supports_ssl(void) | |
96 | { | |
97 | return 0; | |
98 | } | |
99 | ||
100 | void | |
101 | rb_ssl_shutdown(rb_fde_t * F) | |
102 | { | |
103 | return; | |
104 | } | |
105 | ||
106 | void | |
107 | rb_ssl_accept_setup(rb_fde_t * F, int new_fd, struct sockaddr *st, int addrlen) | |
108 | { | |
109 | return; | |
110 | } | |
111 | ||
112 | ssize_t | |
113 | rb_ssl_read(rb_fde_t * F, void *buf, size_t count) | |
114 | { | |
115 | return 0; | |
116 | } | |
117 | ||
118 | ssize_t | |
119 | rb_ssl_write(rb_fde_t * F, const void *buf, size_t count) | |
120 | { | |
121 | return 0; | |
122 | } | |
123 | ||
124 | #endif /* !HAVE_OPENSSL */ | |
125 |