mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Removed usages of gpg.h and cleaned pro-files for Windows.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5296 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
b59f8e664a
commit
703e5def72
@ -287,19 +287,14 @@ win32 {
|
||||
HEADERS += upnp/upnputil.h
|
||||
SOURCES += upnp/upnputil.c
|
||||
|
||||
|
||||
UPNPC_DIR = ../../../miniupnpc-1.3
|
||||
GPG_ERROR_DIR = ../../../libgpg-error-1.10
|
||||
GPGME_DIR = ../../../gpgme-1.1.8
|
||||
|
||||
PTHREADS_DIR = ../../../pthreads-w32-2-8-0-release
|
||||
ZLIB_DIR = ../../../zlib-1.2.3
|
||||
SSL_DIR = ../../../../OpenSSL
|
||||
|
||||
OPENPGPSDK_DIR = ../../openpgpsdk/src
|
||||
INCLUDEPATH *= $${OPENPGPSDK_DIR}
|
||||
|
||||
INCLUDEPATH += . $${SSL_DIR}/include $${UPNPC_DIR} $${PTHREADS_DIR} $${ZLIB_DIR} $${GPGME_DIR}/src $${GPG_ERROR_DIR}/src
|
||||
INCLUDEPATH += . $${SSL_DIR}/include $${UPNPC_DIR} $${PTHREADS_DIR} $${ZLIB_DIR} $${OPENPGPSDK_DIR}
|
||||
}
|
||||
|
||||
|
||||
|
@ -40,7 +40,6 @@
|
||||
#define RS_GPG_AUTH_HEADER
|
||||
|
||||
#include "util/rswin.h"
|
||||
#include <gpgme.h>
|
||||
#include <openssl/ssl.h>
|
||||
#include <openssl/evp.h>
|
||||
#include "util/rsthreads.h"
|
||||
@ -296,98 +295,4 @@ class AuthGPG: public p3Config, public RsThread, public PGPHandler
|
||||
static AuthGPG *_instance ;
|
||||
};
|
||||
|
||||
/*!
|
||||
* Sign a key
|
||||
**/
|
||||
typedef enum
|
||||
{
|
||||
SIGN_START,
|
||||
SIGN_COMMAND,
|
||||
SIGN_UIDS,
|
||||
SIGN_SET_EXPIRE,
|
||||
SIGN_SET_CHECK_LEVEL,
|
||||
SIGN_ENTER_PASSPHRASE,
|
||||
SIGN_CONFIRM,
|
||||
SIGN_QUIT,
|
||||
SIGN_SAVE,
|
||||
SIGN_ERROR
|
||||
} SignState;
|
||||
|
||||
|
||||
/*!
|
||||
* Change the key ownertrust
|
||||
**/
|
||||
typedef enum
|
||||
{
|
||||
TRUST_START,
|
||||
TRUST_COMMAND,
|
||||
TRUST_VALUE,
|
||||
TRUST_REALLY_ULTIMATE,
|
||||
TRUST_QUIT,
|
||||
TRUST_SAVE,
|
||||
TRUST_ERROR
|
||||
} TrustState;
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
* This is the generic data object passed to the
|
||||
* callback function in a gpgme_op_edit operation.
|
||||
* The contents of this object are modified during
|
||||
* each callback, to keep track of states, errors
|
||||
* and other data.
|
||||
*/
|
||||
class EditParams
|
||||
{
|
||||
public:
|
||||
int state;
|
||||
|
||||
/*!
|
||||
* The return code of gpgme_op_edit() is the return value of
|
||||
* the last invocation of the callback. But returning an error
|
||||
* from the callback does not abort the edit operation, so we
|
||||
* must remember any error.
|
||||
*/
|
||||
gpg_error_t err;
|
||||
|
||||
/// Parameters specific to the key operation
|
||||
void *oParams;
|
||||
|
||||
EditParams(int state, void *oParams) {
|
||||
this->state = state;
|
||||
this->err = gpgme_error(GPG_ERR_NO_ERROR);
|
||||
this->oParams = oParams;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/*!
|
||||
* Data specific to key signing
|
||||
**/
|
||||
class SignParams
|
||||
{
|
||||
public:
|
||||
|
||||
std::string checkLvl;
|
||||
|
||||
SignParams(std::string checkLvl) {
|
||||
this->checkLvl = checkLvl;
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
* Data specific to key signing
|
||||
**/
|
||||
class TrustParams
|
||||
{
|
||||
public:
|
||||
|
||||
std::string trustLvl;
|
||||
|
||||
TrustParams(std::string trustLvl) {
|
||||
this->trustLvl = trustLvl;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -39,8 +39,6 @@
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
#include <gpgme.h>
|
||||
|
||||
const std::string CERT_SSL_ID = "--SSLID--";
|
||||
const std::string CERT_LOCATION = "--LOCATION--";
|
||||
const std::string CERT_LOCAL_IP = "--LOCAL--";
|
||||
@ -63,29 +61,28 @@ RsPeers *rsPeers = NULL;
|
||||
|
||||
std::string RsPeerTrustString(uint32_t trustLvl)
|
||||
{
|
||||
|
||||
std::string str;
|
||||
|
||||
switch(trustLvl)
|
||||
{
|
||||
default:
|
||||
case GPGME_VALIDITY_UNKNOWN:
|
||||
str = "GPGME_VALIDITY_UNKNOWN";
|
||||
case RS_TRUST_LVL_UNKNOWN:
|
||||
str = "VALIDITY_UNKNOWN";
|
||||
break;
|
||||
case GPGME_VALIDITY_UNDEFINED:
|
||||
str = "GPGME_VALIDITY_UNDEFINED";
|
||||
case RS_TRUST_LVL_UNDEFINED:
|
||||
str = "VALIDITY_UNDEFINED";
|
||||
break;
|
||||
case GPGME_VALIDITY_NEVER:
|
||||
str = "GPGME_VALIDITY_NEVER";
|
||||
case RS_TRUST_LVL_NEVER:
|
||||
str = "VALIDITY_NEVER";
|
||||
break;
|
||||
case GPGME_VALIDITY_MARGINAL:
|
||||
str = "GPGME_VALIDITY_MARGINAL";
|
||||
case RS_TRUST_LVL_MARGINAL:
|
||||
str = "VALIDITY_MARGINAL";
|
||||
break;
|
||||
case GPGME_VALIDITY_FULL:
|
||||
str = "GPGME_VALIDITY_FULL";
|
||||
case RS_TRUST_LVL_FULL:
|
||||
str = "VALIDITY_FULL";
|
||||
break;
|
||||
case GPGME_VALIDITY_ULTIMATE:
|
||||
str = "GPGME_VALIDITY_ULTIMATE";
|
||||
case RS_TRUST_LVL_ULTIMATE:
|
||||
str = "VALIDITY_ULTIMATE";
|
||||
break;
|
||||
}
|
||||
return str;
|
||||
|
@ -108,9 +108,9 @@ win32 {
|
||||
LIBS += ../../libretroshare/src/lib/libretroshare.a
|
||||
LIBS += ../../openpgpsdk/src/lib/libops.a -lbz2
|
||||
LIBS += -L"../../../lib"
|
||||
LIBS += -lssl -lcrypto -lgpgme -lpthreadGC2d -lminiupnpc -lz
|
||||
LIBS += -lssl -lcrypto -lpthreadGC2d -lminiupnpc -lz
|
||||
# added after bitdht
|
||||
# LIBS += -lws2_32
|
||||
# LIBS += -lws2_32
|
||||
LIBS += -luuid -lole32 -liphlpapi -lcrypt32-cygwin -lgdi32
|
||||
LIBS += -lole32 -lwinmm
|
||||
RC_FILE = gui/images/retroshare_win.rc
|
||||
@ -123,9 +123,7 @@ win32 {
|
||||
|
||||
DEFINES += WINDOWS_SYS
|
||||
|
||||
GPG_ERROR_DIR = ../../../libgpg-error-1.10
|
||||
GPGME_DIR = ../../../gpgme-1.1.8
|
||||
INCLUDEPATH += . $${GPGME_DIR}/src $${GPG_ERROR_DIR}/src
|
||||
INCLUDEPATH += .
|
||||
}
|
||||
|
||||
##################################### MacOS ######################################
|
||||
|
@ -18,7 +18,6 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
****************************************************************/
|
||||
#include <gpgme.h>
|
||||
|
||||
#include "FriendRequest.h"
|
||||
|
||||
|
@ -58,7 +58,7 @@ win32 {
|
||||
LIBS += ../../libretroshare/src/lib/libretroshare.a
|
||||
LIBS += ../../openpgpsdk/src/lib/libops.a -lbz2
|
||||
LIBS += -L"../../../lib" -lssl -lcrypto -lpthreadGC2d -lminiupnpc -lz
|
||||
LIBS += -lssl -lcrypto -lgpgme -lpthreadGC2d -lminiupnpc -lz
|
||||
LIBS += -lssl -lcrypto -lpthreadGC2d -lminiupnpc -lz
|
||||
# added after bitdht
|
||||
# LIBS += -lws2_32
|
||||
LIBS += -luuid -lole32 -liphlpapi -lcrypt32-cygwin -lgdi32
|
||||
|
Loading…
Reference in New Issue
Block a user