/*
- * Copyright (c) 1996-2010 by the citadel.org team
+ * Copyright (c) 1996-2012 by the citadel.org team
*
* This program is open source 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.
- *
+ * modify it under the terms of the GNU General Public License, version 3.
+ *
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "sysdep.h"
*/
void init_ssl(void)
{
- SSL_METHOD *ssl_method;
+ const SSL_METHOD *ssl_method;
RSA *rsa=NULL;
X509_REQ *req = NULL;
X509 *cer = NULL;
* starts SSL/TLS encryption for the current session.
*/
int starttls(int sock) {
- int retval, bits, alg_bits, r;
+ int retval, bits, alg_bits;/*r; */
SSL *newssl;
pthread_setspecific(ThreadSSL, NULL);
errval = SSL_get_error(newssl, retval);
ssl_error_reason = ERR_reason_error_string(ERR_get_error());
if (ssl_error_reason == NULL) {
- syslog(3, "SSL_accept failed: errval=%i, retval=%i %s\n", errval, retval, strerror(errval));
+ syslog(3, "SSL_accept failed: errval=%ld, retval=%d %s\n", errval, retval, strerror(errval));
}
else {
syslog(3, "SSL_accept failed: %s\n", ssl_error_reason);
errval = SSL_get_error(newssl, retval);
ssl_error_reason = ERR_reason_error_string(ERR_get_error());
if (ssl_error_reason == NULL) {
- syslog(3, "SSL_accept failed: errval=%i, retval=%i (%s)\n", errval, retval, strerror(errval));
+ syslog(3, "SSL_accept failed: errval=%ld, retval=%d (%s)\n", errval, retval, strerror(errval));
}
else {
syslog(3, "SSL_accept failed: %s\n", ssl_error_reason);
else {
syslog(15, "SSL_accept success\n");
}
- r = BIO_set_close(newssl->rbio, BIO_NOCLOSE);
+ /*r = */BIO_set_close(newssl->rbio, BIO_NOCLOSE);
bits = SSL_CIPHER_get_bits(SSL_get_current_cipher(newssl), &alg_bits);
syslog(15, "SSL/TLS using %s on %s (%d of %d bits)\n",
SSL_CIPHER_get_name(SSL_get_current_cipher(newssl)),
*/
void endtls(void)
{
- SSL_CTX *ctx = NULL;
+ /*SSL_CTX *ctx;*/
if (THREADSSL == NULL) return;
syslog(15, "Ending SSL/TLS\n");
SSL_shutdown(THREADSSL);
- ctx = SSL_get_SSL_CTX(THREADSSL);
+ /*ctx = */SSL_get_SSL_CTX(THREADSSL);
/* I don't think this is needed, and it crashes the server anyway
*