4
* TLS module - OpenSSL initialization funtions
6
* Copyright (C) 2001-2003 FhG FOKUS
7
* Copyright (C) 2004,2005 Free Software Foundation, Inc.
8
4
* Copyright (C) 2005,2006 iptelorg GmbH
10
* This file is part of SIP-router, a free SIP server.
12
* SIP-router is free software; you can redistribute it and/or modify
13
* it under the terms of the GNU General Public License as published by
14
* the Free Software Foundation; either version 2 of the License, or
15
* (at your option) any later version
17
* SIP-router is distributed in the hope that it will be useful,
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
* GNU General Public License for more details.
22
* You should have received a copy of the GNU General Public License
23
* along with this program; if not, write to the Free Software
24
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29
* 2007-01-26 openssl kerberos malloc bug detection/workaround (andrei)
30
* 2007-02-23 openssl low memory bugs workaround (andrei)
6
* Permission to use, copy, modify, and distribute this software for any
7
* purpose with or without fee is hereby granted, provided that the above
8
* copyright notice and this permission notice appear in all copies.
10
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
33
19
/*! \defgroup tls SIP-router TLS support
342
328
static void init_ssl_methods(void)
330
memset(ssl_methods, 0, sizeof(ssl_methods));
344
332
#ifndef OPENSSL_NO_SSL2
345
333
ssl_methods[TLS_USE_SSLv2_cli - 1] = SSLv2_client_method();
346
334
ssl_methods[TLS_USE_SSLv2_srv - 1] = SSLv2_server_method();
350
338
ssl_methods[TLS_USE_SSLv3_cli - 1] = SSLv3_client_method();
351
339
ssl_methods[TLS_USE_SSLv3_srv - 1] = SSLv3_server_method();
352
340
ssl_methods[TLS_USE_SSLv3 - 1] = SSLv3_method();
354
342
ssl_methods[TLS_USE_TLSv1_cli - 1] = TLSv1_client_method();
355
343
ssl_methods[TLS_USE_TLSv1_srv - 1] = TLSv1_server_method();
356
344
ssl_methods[TLS_USE_TLSv1 - 1] = TLSv1_method();
358
346
ssl_methods[TLS_USE_SSLv23_cli - 1] = SSLv23_client_method();
359
347
ssl_methods[TLS_USE_SSLv23_srv - 1] = SSLv23_server_method();
360
348
ssl_methods[TLS_USE_SSLv23 - 1] = SSLv23_method();
350
#if OPENSSL_VERSION_NUMBER >= 0x1000100fL
351
ssl_methods[TLS_USE_TLSv1_1_cli - 1] = TLSv1_1_client_method();
352
ssl_methods[TLS_USE_TLSv1_1_srv - 1] = TLSv1_1_server_method();
353
ssl_methods[TLS_USE_TLSv1_1 - 1] = TLSv1_1_method();
356
#if OPENSSL_VERSION_NUMBER >= 0x1000105fL
357
ssl_methods[TLS_USE_TLSv1_2_cli - 1] = TLSv1_2_client_method();
358
ssl_methods[TLS_USE_TLSv1_2_srv - 1] = TLSv1_2_server_method();
359
ssl_methods[TLS_USE_TLSv1_2 - 1] = TLSv1_2_method();