mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[7937] Check OpenSSL lib at server start up.
This commit is contained in:
parent
e1927fa4f8
commit
dacdf4e60f
3 changed files with 21 additions and 1 deletions
|
|
@ -28,6 +28,8 @@
|
||||||
#include "SystemConfig.h"
|
#include "SystemConfig.h"
|
||||||
#include "revision.h"
|
#include "revision.h"
|
||||||
#include "revision_nr.h"
|
#include "revision_nr.h"
|
||||||
|
#include <openssl/opensslv.h>
|
||||||
|
#include <openssl/crypto.h>
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include "ServiceWin32.h"
|
#include "ServiceWin32.h"
|
||||||
|
|
@ -158,6 +160,14 @@ extern int main(int argc, char **argv)
|
||||||
|
|
||||||
sLog.outString("Using configuration file %s.", cfg_file);
|
sLog.outString("Using configuration file %s.", cfg_file);
|
||||||
|
|
||||||
|
sLog.outString("%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
|
||||||
|
if (SSLeay() < 0x009080bfL)
|
||||||
|
{
|
||||||
|
sLog.outError("Outdated version of OpenSSL lib, Logins to server impossible!");
|
||||||
|
sLog.outError("minimal required version [OpenSSL 0.9.8k]");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
///- and run the 'Master'
|
///- and run the 'Master'
|
||||||
/// \todo Why do we need this 'Master'? Can't all of this be in the Main as for Realmd?
|
/// \todo Why do we need this 'Master'? Can't all of this be in the Main as for Realmd?
|
||||||
return sMaster.Run();
|
return sMaster.Run();
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,8 @@
|
||||||
#include "revision.h"
|
#include "revision.h"
|
||||||
#include "revision_nr.h"
|
#include "revision_nr.h"
|
||||||
#include "Util.h"
|
#include "Util.h"
|
||||||
|
#include <openssl/opensslv.h>
|
||||||
|
#include <openssl/crypto.h>
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include "ServiceWin32.h"
|
#include "ServiceWin32.h"
|
||||||
|
|
@ -161,6 +163,14 @@ extern int main(int argc, char **argv)
|
||||||
while (pause > clock()) {}
|
while (pause > clock()) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sLog.outString("%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
|
||||||
|
if (SSLeay() < 0x009080bfL )
|
||||||
|
{
|
||||||
|
sLog.outError("Outdated version of OpenSSL lib, Logins to server impossible!");
|
||||||
|
sLog.outError("minimal required version [OpenSSL 0.9.8k]");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
/// realmd PID file creation
|
/// realmd PID file creation
|
||||||
std::string pidfile = sConfig.GetStringDefault("PidFile", "");
|
std::string pidfile = sConfig.GetStringDefault("PidFile", "");
|
||||||
if(!pidfile.empty())
|
if(!pidfile.empty())
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7936"
|
#define REVISION_NR "7937"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue