fixes for building with linux

This commit is contained in:
Dario Rekowski on RockPI 2019-10-03 09:59:53 +00:00
parent e07e437fb9
commit 498a3a12e2
7 changed files with 11 additions and 9 deletions

View File

@ -135,7 +135,8 @@ bool KeyPair::savePrivKey(int userId)
{
auto cm = ConnectionManager::getInstance();
auto em = ErrorManager::getInstance();
Poco::Data::Statement update(cm->getConnection(CONNECTION_MYSQL_LOGIN_SERVER));
auto mysql_session = cm->getConnection(CONNECTION_MYSQL_LOGIN_SERVER);
Poco::Data::Statement update(mysql_session);
Poco::Data::BLOB privkey_blob((const unsigned char*)(*mPrivateKey), mPrivateKey->size());
update << "UPDATE users set privkey = ? where id = ?",

View File

@ -1,7 +1,7 @@
#ifndef GRADIDO_LOGIN_SERVER_CRYPTO_OBFUS_ARRAY
#define GRADIDO_LOGIN_SERVER_CRYPTO_OBFUS_ARRAY
#include <stdio.h>
class ObfusArray
{

View File

@ -63,7 +63,7 @@ namespace ServerConfig {
return false;
}
if (realBinSize != crypto_shorthash_KEYBYTES) {
printf("[%s] serverKey hasn't valid size, expecting: %d, get: %d\n",
printf("[%s] serverKey hasn't valid size, expecting: %u, get: %lu\n",
__FUNCTION__, crypto_shorthash_KEYBYTES, realBinSize);
return false;
}
@ -96,8 +96,9 @@ namespace ServerConfig {
int options = OPT_DEFAULTS,
const std::string& certificateStoreName = CERT_STORE_MY);
*/
g_SSL_CLient_Context = new Context(Context::CLIENT_USE, "", Context::VERIFY_RELAXED, Context::OPT_DEFAULTS);
g_SSL_CLient_Context = new Context(Context::CLIENT_USE, "", "", "", Context::VERIFY_RELAXED, 9, true, "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
// another poco version?
//g_SSL_CLient_Context = new Context(Context::CLIENT_USE, "", Context::VERIFY_RELAXED, Context::OPT_DEFAULTS);
SSLManager::instance().initializeClient(0, pCert, g_SSL_CLient_Context);
return true;

View File

@ -9,7 +9,7 @@
#include "Poco/Data/MySQL/Connector.h"
#include "Poco/Exception.h"
#include "../Model/ErrorList.h"
#include "../model/ErrorList.h"
enum ConnectionType {
CONNECTION_MYSQL_LOGIN_SERVER,

View File

@ -15,7 +15,7 @@
#include <list>
#include <map>
#include <cstring>
#include "../Model/Error.h"
#include "../model/Error.h"
#include "../Crypto/DRHash.h"
#include "../tasks/CPUTask.h"

View File

@ -11,7 +11,7 @@
#define DR_LUA_WEB_MODULE_SESSION_MANAGER_H
#include "../Model/Session.h"
#include "../model/Session.h"
#include "Poco/RegularExpression.h"

View File

@ -130,4 +130,4 @@ namespace UniLib {
}
}
#endif __DR_UNIVERSUM_LIB_CONTROLLER_TASK_H__
#endif //__DR_UNIVERSUM_LIB_CONTROLLER_TASK_H__