| 1 |
michael |
7106 |
/* |
| 2 |
|
|
* ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) |
| 3 |
|
|
* |
| 4 |
michael |
7163 |
* Copyright (c) 2015 Attila Molnar <attilamolnar@hush.com> |
| 5 |
|
|
* Copyright (c) 2015 Adam <Adam@anope.org> |
| 6 |
michael |
8280 |
* Copyright (c) 2015-2018 ircd-hybrid development team |
| 7 |
michael |
7106 |
* |
| 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 |
7272 |
int |
| 35 |
|
|
tls_is_initialized(void) |
| 36 |
|
|
{ |
| 37 |
|
|
return 0; |
| 38 |
|
|
} |
| 39 |
|
|
|
| 40 |
michael |
7106 |
void |
| 41 |
|
|
tls_init(void) |
| 42 |
|
|
{ |
| 43 |
|
|
} |
| 44 |
|
|
|
| 45 |
|
|
int |
| 46 |
|
|
tls_new_cred(void) |
| 47 |
|
|
{ |
| 48 |
michael |
7295 |
return 1; |
| 49 |
michael |
7106 |
} |
| 50 |
|
|
|
| 51 |
|
|
const char * |
| 52 |
|
|
tls_get_cipher(const tls_data_t *tls_data) |
| 53 |
|
|
{ |
| 54 |
|
|
return NULL; |
| 55 |
|
|
} |
| 56 |
|
|
|
| 57 |
michael |
7707 |
const char * |
| 58 |
|
|
tls_get_version(void) |
| 59 |
|
|
{ |
| 60 |
|
|
return NULL; |
| 61 |
|
|
} |
| 62 |
|
|
|
| 63 |
michael |
7106 |
int |
| 64 |
|
|
tls_isusing(tls_data_t *tls_data) |
| 65 |
|
|
{ |
| 66 |
|
|
return 0; |
| 67 |
|
|
} |
| 68 |
|
|
|
| 69 |
|
|
void |
| 70 |
|
|
tls_free(tls_data_t *tls_data) |
| 71 |
|
|
{ |
| 72 |
|
|
} |
| 73 |
|
|
|
| 74 |
|
|
int |
| 75 |
michael |
8659 |
tls_read(tls_data_t *tls_data, char *buf, size_t bufsize, bool *want_write) |
| 76 |
michael |
7106 |
{ |
| 77 |
|
|
return -1; |
| 78 |
|
|
} |
| 79 |
|
|
|
| 80 |
|
|
int |
| 81 |
michael |
8659 |
tls_write(tls_data_t *tls_data, const char *buf, size_t bufsize, bool *want_read) |
| 82 |
michael |
7106 |
{ |
| 83 |
|
|
return -1; |
| 84 |
|
|
} |
| 85 |
|
|
|
| 86 |
|
|
void |
| 87 |
|
|
tls_shutdown(tls_data_t *tls_data) |
| 88 |
|
|
{ |
| 89 |
|
|
} |
| 90 |
|
|
|
| 91 |
|
|
int |
| 92 |
|
|
tls_new(tls_data_t *tls_data, int fd, tls_role_t role) |
| 93 |
|
|
{ |
| 94 |
|
|
return 0; |
| 95 |
|
|
} |
| 96 |
|
|
|
| 97 |
michael |
7276 |
tls_handshake_status_t |
| 98 |
|
|
tls_handshake(tls_data_t *tls_data, tls_role_t role, const char **errstr) |
| 99 |
|
|
{ |
| 100 |
|
|
return 0; |
| 101 |
|
|
} |
| 102 |
|
|
|
| 103 |
michael |
7106 |
int |
| 104 |
|
|
tls_set_ciphers(tls_data_t *tls_data, const char *cipher_list) |
| 105 |
|
|
{ |
| 106 |
|
|
return 0; |
| 107 |
|
|
} |
| 108 |
|
|
|
| 109 |
|
|
int |
| 110 |
michael |
7143 |
tls_verify_cert(tls_data_t *tls_data, tls_md_t digest, char **fingerprint) |
| 111 |
michael |
7106 |
{ |
| 112 |
|
|
return 0; |
| 113 |
|
|
} |
| 114 |
|
|
#endif /* HAVE_TLS */ |