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