Turned RsInit into a static class, and changed retroshare invite so that it does not contain signatures anymore.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1022 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2009-02-08 14:30:28 +00:00
parent b9abc24e5c
commit 78c07ca367
18 changed files with 589 additions and 464 deletions

View file

@ -24,8 +24,10 @@
*/
#include "rsserver/p3peers.h"
#include "rsserver/p3face.h"
#include "pqi/p3connmgr.h"
#include "pqi/p3authmgr.h"
#include <rsiface/rsinit.h>
#include <iostream>
#include <fstream>
@ -566,7 +568,20 @@ std::string p3Peers::GetRetroshareInvite()
#endif
std::string ownId = mAuthMgr->OwnId();
std::string certstr = mAuthMgr->SaveCertificateToString(ownId);
//std::string certstr = mAuthMgr->SaveCertificateToString(ownId);
std::string certstr ;
FILE *fcert = fopen(RsInit::load_cert.c_str(), "r");
char *line = NULL;
size_t len = 0 ;
if(fcert == NULL)
return "Error: could not open certificate file." ;
while(getline(&line,&len,fcert) > 0)
certstr += std::string(line) ;
fclose(fcert) ;
std::string name = mAuthMgr->getName(ownId);
std::ostringstream out;