mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-29 17:36:19 -05:00
Solve windows gpg bug and modify windows .pro project files qtcreator
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1787 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
49b24c2b14
commit
6fba28ee0d
@ -67,7 +67,11 @@ win32-x-g++ {
|
||||
QMAKE_AR = i586-mingw32msvc-ar
|
||||
DEFINES *= STATICLIB WIN32
|
||||
|
||||
SSL_DIR=../../../../openssl
|
||||
#miniupnp implementation files
|
||||
HEADERS += upnp/upnputil.h
|
||||
SOURCES += upnp/upnputil.c
|
||||
|
||||
SSL_DIR=../../../../openssl
|
||||
UPNPC_DIR = ../../../../miniupnpc-1.3
|
||||
GPG_ERROR_DIR = ../../../../libgpg-error-1.7
|
||||
GPGME_DIR = ../../../../gpgme-1.1.8
|
||||
@ -81,11 +85,15 @@ win32 {
|
||||
OBJECTS_DIR = temp/obj
|
||||
MOC_DIR = temp/moc
|
||||
DEFINES = WINDOWS_SYS WIN32 STATICLIB MINGW
|
||||
DEFINES *= MINIUPNPC_VERSION=13
|
||||
DEFINES *= MINIUPNPC_VERSION=13
|
||||
DESTDIR = lib
|
||||
|
||||
#miniupnp implementation files
|
||||
HEADERS += upnp/upnputil.h
|
||||
SOURCES += upnp/upnputil.c
|
||||
|
||||
UPNPC_DIR = ../../../../miniupnpc-1.3
|
||||
|
||||
UPNPC_DIR = ../../../../miniupnpc-1.3
|
||||
GPG_ERROR_DIR = ../../../../libgpg-error-1.7
|
||||
GPGME_DIR = ../../../../gpgme-1.1.8
|
||||
|
||||
@ -249,7 +257,6 @@ HEADERS += dbase/cachestrapper.h \
|
||||
tcponudp/udplayer.h \
|
||||
tcponudp/udpsorter.h \
|
||||
upnp/upnphandler.h \
|
||||
upnp/UPnPBase.h \
|
||||
util/rsdebug.h \
|
||||
util/rsdir.h \
|
||||
util/rsnet.h \
|
||||
@ -258,7 +265,7 @@ HEADERS += dbase/cachestrapper.h \
|
||||
util/rswin.h \
|
||||
util/rsversion.h
|
||||
|
||||
SOURCES = \
|
||||
SOURCES += \
|
||||
dht/dht_check_peers.cc \
|
||||
dht/dht_bootstrap.cc \
|
||||
rsserver/p3face-msgs.cc \
|
||||
|
@ -1411,7 +1411,7 @@ bool GPGAuthMgr::getPGPAllList(std::list<std::string> &ids)
|
||||
|
||||
bool GPGAuthMgr::decryptText(gpgme_data_t CIPHER, gpgme_data_t PLAIN) {
|
||||
RsStackMutex stack(pgpMtx); /******* LOCKED ******/
|
||||
|
||||
gpgme_set_armor (CTX, 1);
|
||||
gpg_error_t ERR;
|
||||
if (GPG_ERR_NO_ERROR != (ERR = gpgme_op_decrypt (CTX, CIPHER, PLAIN)))
|
||||
{
|
||||
@ -1429,7 +1429,7 @@ bool GPGAuthMgr::encryptText(gpgme_data_t PLAIN, gpgme_data_t CIPHER) {
|
||||
|
||||
gpgme_encrypt_flags_t* flags = new gpgme_encrypt_flags_t();
|
||||
gpgme_key_t keys[2] = {mOwnGpgCert.key, NULL};
|
||||
|
||||
gpgme_set_armor (CTX, 1);
|
||||
gpg_error_t ERR;
|
||||
if (GPG_ERR_NO_ERROR != (ERR = gpgme_op_encrypt(CTX, keys, *flags, PLAIN, CIPHER)))
|
||||
{
|
||||
|
@ -1258,11 +1258,11 @@ int RsInit::LoadCertificates(bool autoLoginNT)
|
||||
|
||||
std::cerr << "let's store the ssl Password into a pgp ecrypted file" << std::endl;
|
||||
FILE *sslPassphraseFile = fopen(RsInitConfig::ssl_passphrase_file.c_str(), "w");
|
||||
std::cerr << "opening sslPassphraseFile. : " << RsInitConfig::ssl_passphrase_file.c_str() << std::endl;
|
||||
std::cerr << "opening sslPassphraseFile : " << RsInitConfig::ssl_passphrase_file.c_str() << std::endl;
|
||||
gpgme_data_t cipher;
|
||||
gpgme_data_t plain;
|
||||
gpgme_data_new_from_mem(&plain, sslPassword, strlen(sslPassword), 0);
|
||||
gpgme_error_t error_reading_file = gpgme_data_new_from_stream (&cipher, sslPassphraseFile);
|
||||
gpgme_data_new_from_mem(&plain, sslPassword, strlen(sslPassword), 1);
|
||||
gpgme_data_new_from_stream (&cipher, sslPassphraseFile);
|
||||
if (0 < authMgr->encryptText(plain, cipher)) {
|
||||
std::cerr << "Encrypting went ok !" << std::endl;
|
||||
}
|
||||
@ -1276,10 +1276,10 @@ int RsInit::LoadCertificates(bool autoLoginNT)
|
||||
FILE *sslPassphraseFile = fopen(RsInitConfig::ssl_passphrase_file.c_str(), "r");
|
||||
if (sslPassphraseFile == NULL)
|
||||
{
|
||||
std::cerr << "No password povided, and no sslPassphraseFile." << std::endl;
|
||||
std::cerr << "No password povided, and no sslPassphraseFile : " << RsInitConfig::ssl_passphrase_file.c_str() << std::endl;
|
||||
return 0;
|
||||
} else {
|
||||
std::cerr << "opening sslPassphraseFile." << std::endl;
|
||||
std::cerr << "opening sslPassphraseFile : " << RsInitConfig::ssl_passphrase_file.c_str() << std::endl;
|
||||
gpgme_data_t cipher;
|
||||
gpgme_data_t plain;
|
||||
gpgme_data_new (&plain);
|
||||
|
@ -1,4 +1,4 @@
|
||||
CONFIG += qt gui uic qrc resources uitools debug pluginmgr newsettings #release
|
||||
CONFIG += qt gui uic qrc resources uitools pluginmgr newsettings release
|
||||
QT += network xml script
|
||||
TEMPLATE = app
|
||||
TARGET = RetroShare
|
||||
@ -63,14 +63,11 @@ win32 {
|
||||
#LIBS += -L"D/Qt/2009.03/qt/plugins/imageformats"
|
||||
#QTPLUGIN += qjpeg
|
||||
|
||||
LIBS += ../../libretroshare/src/lib/libretroshare.a
|
||||
LIBS += -L"../../../../lib"
|
||||
LIBS += -lretroshare -lssl -lcrypto -lgpgme -lpthreadGC2d -lminiupnpc -lz
|
||||
LIBS += -lssl -lcrypto -lgpgme -lpthreadGC2d -lminiupnpc -lz
|
||||
LIBS += -lws2_32 -luuid -lole32 -liphlpapi -lcrypt32-cygwin -lgdi32
|
||||
LIBS += -lole32 -lwinmm
|
||||
|
||||
INCLUDEPATH += ../../../../gpgme-1.1.8/src/
|
||||
INCLUDEPATH += ../../../../libgpg-error-1.7/src/
|
||||
|
||||
RC_FILE = gui/images/retroshare_win.rc
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user