mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-20 04:14:27 -04: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
4 changed files with 22 additions and 18 deletions
|
@ -67,6 +67,10 @@ win32-x-g++ {
|
||||||
QMAKE_AR = i586-mingw32msvc-ar
|
QMAKE_AR = i586-mingw32msvc-ar
|
||||||
DEFINES *= STATICLIB WIN32
|
DEFINES *= STATICLIB WIN32
|
||||||
|
|
||||||
|
#miniupnp implementation files
|
||||||
|
HEADERS += upnp/upnputil.h
|
||||||
|
SOURCES += upnp/upnputil.c
|
||||||
|
|
||||||
SSL_DIR=../../../../openssl
|
SSL_DIR=../../../../openssl
|
||||||
UPNPC_DIR = ../../../../miniupnpc-1.3
|
UPNPC_DIR = ../../../../miniupnpc-1.3
|
||||||
GPG_ERROR_DIR = ../../../../libgpg-error-1.7
|
GPG_ERROR_DIR = ../../../../libgpg-error-1.7
|
||||||
|
@ -84,6 +88,10 @@ win32 {
|
||||||
DEFINES *= MINIUPNPC_VERSION=13
|
DEFINES *= MINIUPNPC_VERSION=13
|
||||||
DESTDIR = lib
|
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
|
GPG_ERROR_DIR = ../../../../libgpg-error-1.7
|
||||||
|
@ -249,7 +257,6 @@ HEADERS += dbase/cachestrapper.h \
|
||||||
tcponudp/udplayer.h \
|
tcponudp/udplayer.h \
|
||||||
tcponudp/udpsorter.h \
|
tcponudp/udpsorter.h \
|
||||||
upnp/upnphandler.h \
|
upnp/upnphandler.h \
|
||||||
upnp/UPnPBase.h \
|
|
||||||
util/rsdebug.h \
|
util/rsdebug.h \
|
||||||
util/rsdir.h \
|
util/rsdir.h \
|
||||||
util/rsnet.h \
|
util/rsnet.h \
|
||||||
|
@ -258,7 +265,7 @@ HEADERS += dbase/cachestrapper.h \
|
||||||
util/rswin.h \
|
util/rswin.h \
|
||||||
util/rsversion.h
|
util/rsversion.h
|
||||||
|
|
||||||
SOURCES = \
|
SOURCES += \
|
||||||
dht/dht_check_peers.cc \
|
dht/dht_check_peers.cc \
|
||||||
dht/dht_bootstrap.cc \
|
dht/dht_bootstrap.cc \
|
||||||
rsserver/p3face-msgs.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) {
|
bool GPGAuthMgr::decryptText(gpgme_data_t CIPHER, gpgme_data_t PLAIN) {
|
||||||
RsStackMutex stack(pgpMtx); /******* LOCKED ******/
|
RsStackMutex stack(pgpMtx); /******* LOCKED ******/
|
||||||
|
gpgme_set_armor (CTX, 1);
|
||||||
gpg_error_t ERR;
|
gpg_error_t ERR;
|
||||||
if (GPG_ERR_NO_ERROR != (ERR = gpgme_op_decrypt (CTX, CIPHER, PLAIN)))
|
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_encrypt_flags_t* flags = new gpgme_encrypt_flags_t();
|
||||||
gpgme_key_t keys[2] = {mOwnGpgCert.key, NULL};
|
gpgme_key_t keys[2] = {mOwnGpgCert.key, NULL};
|
||||||
|
gpgme_set_armor (CTX, 1);
|
||||||
gpg_error_t ERR;
|
gpg_error_t ERR;
|
||||||
if (GPG_ERR_NO_ERROR != (ERR = gpgme_op_encrypt(CTX, keys, *flags, PLAIN, CIPHER)))
|
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;
|
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");
|
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 cipher;
|
||||||
gpgme_data_t plain;
|
gpgme_data_t plain;
|
||||||
gpgme_data_new_from_mem(&plain, sslPassword, strlen(sslPassword), 0);
|
gpgme_data_new_from_mem(&plain, sslPassword, strlen(sslPassword), 1);
|
||||||
gpgme_error_t error_reading_file = gpgme_data_new_from_stream (&cipher, sslPassphraseFile);
|
gpgme_data_new_from_stream (&cipher, sslPassphraseFile);
|
||||||
if (0 < authMgr->encryptText(plain, cipher)) {
|
if (0 < authMgr->encryptText(plain, cipher)) {
|
||||||
std::cerr << "Encrypting went ok !" << std::endl;
|
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");
|
FILE *sslPassphraseFile = fopen(RsInitConfig::ssl_passphrase_file.c_str(), "r");
|
||||||
if (sslPassphraseFile == NULL)
|
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;
|
return 0;
|
||||||
} else {
|
} 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 cipher;
|
||||||
gpgme_data_t plain;
|
gpgme_data_t plain;
|
||||||
gpgme_data_new (&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
|
QT += network xml script
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
TARGET = RetroShare
|
TARGET = RetroShare
|
||||||
|
@ -63,14 +63,11 @@ win32 {
|
||||||
#LIBS += -L"D/Qt/2009.03/qt/plugins/imageformats"
|
#LIBS += -L"D/Qt/2009.03/qt/plugins/imageformats"
|
||||||
#QTPLUGIN += qjpeg
|
#QTPLUGIN += qjpeg
|
||||||
|
|
||||||
|
LIBS += ../../libretroshare/src/lib/libretroshare.a
|
||||||
LIBS += -L"../../../../lib"
|
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 += -lws2_32 -luuid -lole32 -liphlpapi -lcrypt32-cygwin -lgdi32
|
||||||
LIBS += -lole32 -lwinmm
|
LIBS += -lole32 -lwinmm
|
||||||
|
|
||||||
INCLUDEPATH += ../../../../gpgme-1.1.8/src/
|
|
||||||
INCLUDEPATH += ../../../../libgpg-error-1.7/src/
|
|
||||||
|
|
||||||
RC_FILE = gui/images/retroshare_win.rc
|
RC_FILE = gui/images/retroshare_win.rc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue