diff --git a/retroshare-friendserver/src/friendserver.cc b/retroshare-friendserver/src/friendserver.cc index 45574a1b9..3c80bba83 100644 --- a/retroshare-friendserver/src/friendserver.cc +++ b/retroshare-friendserver/src/friendserver.cc @@ -8,10 +8,10 @@ #include "pgp/pgpkeyutil.h" #include "pgp/rscertificate.h" -#ifdef USE_RNP_LIB -#include "pgp/rnppgphandler.h" -#else +#ifdef USE_OPENPGPSDK #include "pgp/openpgpsdkhandler.h" +#else +#include "pgp/rnppgphandler.h" #endif #include "friendserver.h" @@ -397,10 +397,10 @@ FriendServer::FriendServer(const std::string& base_dir,const std::string& listen std::string pgp_private_keyring_path = RsDirUtil::makePath(base_dir,"pgp_private_keyring") ; // not used. std::string pgp_trustdb_path = RsDirUtil::makePath(base_dir,"pgp_trustdb") ; // not used. -#ifdef USE_RNP_LIB - mPgpHandler = new RNPPGPHandler(pgp_public_keyring_path,pgp_private_keyring_path,pgp_trustdb_path,pgp_lock_path); -#else +#ifdef USE_OPENPGPSDK mPgpHandler = new OpenPGPSDKHandler(pgp_public_keyring_path,pgp_private_keyring_path,pgp_trustdb_path,pgp_lock_path); +#else + mPgpHandler = new RNPPGPHandler(pgp_public_keyring_path,pgp_private_keyring_path,pgp_trustdb_path,pgp_lock_path); #endif // Random bias. Should be cryptographically safe. diff --git a/retroshare-gui/src/gui/connect/PGPKeyDialog.cpp b/retroshare-gui/src/gui/connect/PGPKeyDialog.cpp index bcd0abea2..798578e0b 100644 --- a/retroshare-gui/src/gui/connect/PGPKeyDialog.cpp +++ b/retroshare-gui/src/gui/connect/PGPKeyDialog.cpp @@ -196,11 +196,11 @@ void PGPKeyDialog::load() ui.trustlevel_CB->show(); ui.is_signing_me->show(); ui.signersLabel->setText(tr("This key is signed by :")+" "); -#ifdef USE_RNP_LIB +#ifdef USE_OPENPGPSDK + ui.signKeyButton->setEnabled(!detail.ownsign); +#else ui.signKeyButton->setEnabled(false); ui.signKeyButton->setToolTip("Disabled because key signing is not yet implemented in RNP lib"); -#else - ui.signKeyButton->setEnabled(!detail.ownsign); #endif if (detail.accept_connection) diff --git a/retroshare.pri b/retroshare.pri index c64214ac0..0a75509a5 100644 --- a/retroshare.pri +++ b/retroshare.pri @@ -184,8 +184,8 @@ rs_use_native_dialogs:CONFIG -= no_rs_use_native_dialogs # By default, use RNP lib for RFC4880 PGP management. If not, compilation will # default to openpgp-sdk, which is old and unmaintained, so probably not very secure. -CONFIG *= rs_rnplib -rs_no_rnplib:CONFIG -= use_rnp_lib +CONFIG *= +rs_no_openpgpsdk:CONFIG -= use_openpgpsdk # To disable broadcast discovery append the following assignation to qmake # command line "CONFIG+=no_rs_broadcast_discovery" @@ -867,14 +867,14 @@ isEmpty(RS_UPNP_LIB) { } } -rs_rnplib { - DEFINES += USE_RNP_LIB - message("Using RNP lib for PGP") -} else { +rs_openpgpsdk { SUBDIRS += openpgpsdk openpgpsdk.file = openpgpsdk/src/openpgpsdk.pro libretroshare.depends += openpgpsdk message("Using OpenPGP-SDK for PGP") +} else { + DEFINES += USE_RNP_LIB + message("Using RNP lib for PGP") }