X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=src%2Fssl.c;h=46827f774b82cd7143320fda3f1357170aff6350;hb=ccca0b3f6bdf4d5ebb360e96857f533a43da66d5;hp=4b9f520d51bda72e870a264a70e093818d7aa17e;hpb=eaca75aa6c133cc6ff3d707f7ae8dbfbe51a6d2a;p=dockapps%2Fwmnotify.git diff --git a/src/ssl.c b/src/ssl.c index 4b9f520..46827f7 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -1,7 +1,23 @@ -/* ssl.c */ - -/* Based on ssl_client.c (Sean Walton and Macmillan Publishers). */ - +/* + * ssl.c + * + * Copyright (C) 2003 Hugo Villeneuve + * Based on ssl_client.c (Sean Walton and Macmillan Publishers). + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + */ #if HAVE_CONFIG_H # include "config.h" @@ -35,10 +51,10 @@ InitCTX( void ) SSL_METHOD *method; SSL_CTX *ctx; - OpenSSL_add_all_algorithms(); /* Load cryptos, et.al. */ - SSL_load_error_strings(); /* Bring in and register error messages */ - method = SSLv2_client_method(); /* Create new client-method instance */ - ctx = SSL_CTX_new(method); /* Create new context */ + SSL_library_init(); /* Load cryptos, et.al. */ + SSL_load_error_strings(); /* Bring in and register error messages */ + method = SSLv23_client_method(); /* Indicate we support SSLv2, SSLv3 and TLSv1 methods. */ + ctx = SSL_CTX_new(method); /* Create new context */ if( ctx == NULL ) { ERR_print_errors_fp(stderr); abort();