2 * version.c Print version number and exit.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 * Copyright 1999-2008 The FreeRADIUS server project
21 * Copyright 2000 Alan DeKok <aland@ox.org>
22 * Copyright 2000 Chris Parker <cparker@starnetusa.com>
25 #include <freeradius-devel/ident.h>
28 #include <freeradius-devel/radiusd.h>
31 #ifdef HAVE_OPENSSL_CRYPTO_H
32 #include <openssl/crypto.h>
33 #include <openssl/opensslv.h>
35 static long ssl_built = OPENSSL_VERSION_NUMBER;
37 /** Check build and linked versions of OpenSSL match
39 * Startup check for whether the linked version of OpenSSL matches the
40 * version the server was built against.
42 * @return 0 if ok, else -1
44 int ssl_check_version(void)
48 ssl_linked = SSLeay();
50 if (ssl_linked != ssl_built) {
51 radlog(L_ERR, "libssl version mismatch."
52 " Built with: %lx\n Linked: %lx",
53 (unsigned long) ssl_built,
54 (unsigned long) ssl_linked);
62 /** Print the current linked version of Openssl
64 * Print the currently linked version of the OpenSSL library.
66 const char *ssl_version(void)
68 return SSLeay_version(SSLEAY_VERSION);
71 int ssl_version_check(void) {
75 const char *ssl_version()
82 * Display the revision number for this program
87 radlog(L_INFO, "%s: %s", progname, radiusd_version);
88 DEBUG3("Server was built with: ");
90 #ifdef WITH_ACCOUNTING
91 DEBUG3(" accounting");
93 DEBUG3(" authentication"); /* always enabled */
94 /* here are all the conditional feature flags */
95 #if defined(WITH_DHCP)
98 #if defined(WITH_VMPS)
104 #if defined(WITHOUT_PROXY)
105 DEBUG3(" WITHOUT_PROXY");
107 #if defined(WITHOUT_DETAIL)
108 DEBUG3(" WITHOUT_DETAIL");
110 #if defined(WITHOUT_SESSION_MGMT)
111 DEBUG3(" WITHOUT_SESSION_MGMT");
113 #if defined(WITHOUT_UNLANG)
114 DEBUG3(" WITHOUT_UNLANG");
116 #if defined(WITHOUT_ACCOUNTING)
117 DEBUG3(" WITHOUT_ACCOUNTING");
119 #if defined(WITHOUT_DYNAMIC_CLIENTS)
120 DEBUG3(" WITHOUT_DYNAMIC_CLIENTS");
122 #if defined(WITHOUT_STATS)
123 DEBUG3(" WITHOUT_STATS");
125 #if defined(WITHOUT_COMMAND_SOCKET)
126 DEBUG3(" WITHOUT_COMMAND_SOCKET");
128 #if defined(WITHOUT_COA)
129 DEBUG3(" WITHOUT_COA");
131 DEBUG3("Server core libs:");
132 DEBUG3(" ssl: %s", ssl_version());
134 radlog(L_INFO, "Copyright (C) 1999-2013 The FreeRADIUS server project and contributors.");
135 radlog(L_INFO, "There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A");
136 radlog(L_INFO, "PARTICULAR PURPOSE.");
137 radlog(L_INFO, "You may redistribute copies of FreeRADIUS under the terms of the");
138 radlog(L_INFO, "GNU General Public License.");
139 radlog(L_INFO, "For more information about these matters, see the file named COPYRIGHT.");