X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;ds=sidebyside;f=src%2FIOHandler_SSL.h;fp=src%2FIOHandler_SSL.h;h=8affca26d46bb57ec58d3648b7082c16254456a9;hb=526bf10a06332efc4505bee2d2cff7b959a169b8;hp=0000000000000000000000000000000000000000;hpb=79b5ee62665a460214046003cdbe1b4b4f1fa39e;p=TransparentIRC.git diff --git a/src/IOHandler_SSL.h b/src/IOHandler_SSL.h new file mode 100644 index 0000000..8affca2 --- /dev/null +++ b/src/IOHandler_SSL.h @@ -0,0 +1,45 @@ +/* IOHandler_SSL.h - TransparentIRC 0.1 + * Copyright (C) 2011-2012 Philipp Kreil (pk910) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef _IOHandler_SSL_h +#define _IOHandler_SSL_h +#include "overall.h" + +struct IODescriptor; + +#ifdef HAVE_SSL +#include +#include +#include + +struct IOSSLNode { + SSL *sslHandle; + SSL_CTX *sslContext; +}; +#else +struct IOSSLNode { + //just unused +}; +#endif + +void iohandler_ssl_init(); +void iohandler_ssl_connect(struct IODescriptor *iofd); +void iohandler_ssl_client_handshake(struct IODescriptor *iofd); +void iohandler_ssl_disconnect(struct IODescriptor *iofd); +int iohandler_ssl_read(struct IODescriptor *iofd, char *buffer, int len); +int iohandler_ssl_write(struct IODescriptor *iofd, char *buffer, int len); + +#endif