implemented deferred signature method in notify system to alow signing from a non GUI thread

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6175 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2013-03-01 23:00:43 +00:00
parent e397560654
commit 9b01e3658d
8 changed files with 119 additions and 1 deletions

View file

@ -26,6 +26,7 @@
#include "services/p3idservice.h"
#include "serialiser/rsgxsiditems.h"
#include "retroshare/rsgxsflags.h"
#include "retroshare/rsiface.h"
#include "util/rsrandom.h"
#include "util/rsstring.h"
@ -48,6 +49,8 @@
#define ID_REQUEST_REPUTATION 0x0003
#define ID_REQUEST_OPINION 0x0004
#define ENABLE_PGP_SIGNATURES 1
RsIdentity *rsIdentity = NULL;
@ -1340,7 +1343,9 @@ void p3IdService::service_CreateGroup(RsGxsGrpItem* grpItem, RsTlvSecurityKeySet
#define MAX_SIGN_SIZE 2048
uint8_t signarray[MAX_SIGN_SIZE];
unsigned int sign_size = MAX_SIGN_SIZE;
if (!AuthGPG::getAuthGPG()->SignDataBin((void *) hash.toByteArray(), hash.SIZE_IN_BYTES, signarray, &sign_size))
int result ;
if (!rsicontrol->getNotify().askForDeferredSelfSignature((void *) hash.toByteArray(), hash.SIZE_IN_BYTES, signarray, &sign_size,result))
{
/* error */
std::cerr << "p3IdService::service_CreateGroup() ERROR Signing stuff";