2 * IRC - Internet Relay Chat, ircd/ssl.c
3 * Copyright (C) 2015 pk910 (Philipp Kreil)
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 1, or (at your option)
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
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 * @brief Implementation of functions for handling ssl connections
29 #include "ircd_features.h"
31 #include "ircd_reply.h"
40 /* #include <assert.h> -- Now using assert in ircd_log.h */
44 #define IOV_MAX 16 /**< minimum required length of an iovec array */
47 #if defined(HAVE_GNUTLS)
48 #include "ssl.gnutls.c"
49 #elif defined(HAVE_OPENSSL)
50 #include "ssl.openssl.c"
52 void ssl_free_connection(struct SSLConnection *connection) {}
53 void ssl_free_listener(struct SSLConnection *listener) {}
54 struct SSLListener *ssl_create_listener() { return NULL; }
55 struct SSLConnection *ssl_start_handshake_listener(struct SSLListener *listener, int fd, void *data, enum SSLDataType datatype) { return NULL; }
56 IOResult ssl_recv_decrypt(struct SSLConnection *connection, char *buf, int *len) { return IO_FAILURE; }
57 int ssl_connection_flush(struct SSLConnection *connection) { return 0; };
58 const char* ssl_get_cipher(struct SSLConnection *connection) { return NULL; }