mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fix UnitTests Compilation
This commit is contained in:
parent
d34b2e885a
commit
f2b995768b
@ -122,28 +122,42 @@ const RsPgpId& rs_nxs_test::RsDummyPgpUtils::getPGPOwnId() {
|
||||
return mOwnId;
|
||||
}
|
||||
|
||||
RsPgpId rs_nxs_test::RsDummyPgpUtils::getPGPId(const RsPeerId& sslid) {
|
||||
RsPgpId rs_nxs_test::RsDummyPgpUtils::getPGPId(const RsPeerId& /*sslid*/) {
|
||||
return RsPgpId().random();
|
||||
}
|
||||
|
||||
bool rs_nxs_test::RsDummyPgpUtils::getGPGAllList(std::list<RsPgpId>& ids) {
|
||||
bool rs_nxs_test::RsDummyPgpUtils::getGPGAllList(std::list<RsPgpId>& /*ids*/) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool rs_nxs_test::RsDummyPgpUtils::getKeyFingerprint(const RsPgpId& id,
|
||||
PGPFingerprintType& fp) const {
|
||||
bool rs_nxs_test::RsDummyPgpUtils::getKeyFingerprint(const RsPgpId& /*id*/,
|
||||
PGPFingerprintType& /*fp*/
|
||||
) const {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool rs_nxs_test::RsDummyPgpUtils::VerifySignBin(const void* data, uint32_t len,
|
||||
unsigned char* sign, unsigned int signlen,
|
||||
const PGPFingerprintType& withfingerprint) {
|
||||
bool rs_nxs_test::RsDummyPgpUtils::parseSignature(unsigned char* /*sign*/,
|
||||
unsigned int /*signlen*/,
|
||||
RsPgpId& /*issuer*/
|
||||
) const {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool rs_nxs_test::RsDummyPgpUtils::askForDeferredSelfSignature(const void* data,
|
||||
const uint32_t len, unsigned char* sign, unsigned int* signlen,
|
||||
int& signature_result) {
|
||||
bool rs_nxs_test::RsDummyPgpUtils::VerifySignBin(const void* /*data*/,
|
||||
uint32_t /*len*/,
|
||||
unsigned char* /*sign*/,
|
||||
unsigned int /*signlen*/,
|
||||
const PGPFingerprintType& /*withfingerprint*/
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool rs_nxs_test::RsDummyPgpUtils::askForDeferredSelfSignature(const void* /*data*/,
|
||||
const uint32_t /*len*/,
|
||||
unsigned char* /*sign*/,
|
||||
unsigned int* /*signlen*/,
|
||||
int& /*signature_result*/
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -155,6 +155,7 @@ namespace rs_nxs_test
|
||||
bool getGPGAllList(std::list<RsPgpId> &ids) ;
|
||||
bool getKeyFingerprint(const RsPgpId& id,PGPFingerprintType& fp) const;
|
||||
|
||||
bool parseSignature(unsigned char *sign, unsigned int signlen, RsPgpId& issuer) const;
|
||||
bool VerifySignBin(const void *data, uint32_t len, unsigned char *sign, unsigned int signlen, const PGPFingerprintType& withfingerprint);
|
||||
bool askForDeferredSelfSignature(const void *data, const uint32_t len, unsigned char *sign, unsigned int *signlen,int& signature_result );
|
||||
|
||||
|
@ -12,7 +12,8 @@
|
||||
#include "gxs/rsdataservice.h"
|
||||
#include "nxsdummyservices.h"
|
||||
#include "../common/data_support.h"
|
||||
#include <auto_ptr.h>
|
||||
//#include <auto_ptr.h> //Already include in memory, a better way.
|
||||
#include <memory>
|
||||
|
||||
using namespace rs_nxs_test;
|
||||
|
||||
|
@ -42,7 +42,6 @@ void FakePgpAuxUtils::addPeerListToPgpList(const std::list<RsPeerId> &ids)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void FakePgpAuxUtils::addPeerIdToPgpList(const RsPeerId &id)
|
||||
{
|
||||
RsPgpId pgpId = getPGPId(id);
|
||||
@ -52,7 +51,6 @@ void FakePgpAuxUtils::addPeerIdToPgpList(const RsPeerId &id)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const RsPgpId & FakePgpAuxUtils::getPGPOwnId()
|
||||
{
|
||||
return mOwnId;
|
||||
@ -74,7 +72,6 @@ RsPgpId FakePgpAuxUtils::getPGPId(const RsPeerId& sslid)
|
||||
return pgpId;
|
||||
}
|
||||
|
||||
|
||||
bool FakePgpAuxUtils::getKeyFingerprint(const RsPgpId& id,PGPFingerprintType& fp) const
|
||||
{
|
||||
/* convert an sslId */
|
||||
@ -93,7 +90,12 @@ bool FakePgpAuxUtils::getKeyFingerprint(const RsPgpId& id,PGPFingerprintType& fp
|
||||
return true;
|
||||
}
|
||||
|
||||
bool FakePgpAuxUtils::VerifySignBin(const void *data, uint32_t len, unsigned char *sign, unsigned int signlen, const PGPFingerprintType& withfingerprint)
|
||||
bool FakePgpAuxUtils::parseSignature(unsigned char* /*sign*/, unsigned int /*signlen*/, RsPgpId& /*issuer*/) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool FakePgpAuxUtils::VerifySignBin(const void* /*data*/, uint32_t /*len*/, unsigned char* /*sign*/, unsigned int /*signlen*/, const PGPFingerprintType& /*withfingerprint*/)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -104,8 +106,7 @@ bool FakePgpAuxUtils::getGPGAllList(std::list<RsPgpId> &ids)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool FakePgpAuxUtils::askForDeferredSelfSignature(const void *data, const uint32_t len, unsigned char *sign, unsigned int *signlen,int& signature_result )
|
||||
bool FakePgpAuxUtils::askForDeferredSelfSignature(const void* /*data*/, const uint32_t /*len*/, unsigned char *sign, unsigned int *signlen,int& signature_result )
|
||||
{
|
||||
for(int i = 0; i < *signlen; i++)
|
||||
{
|
||||
|
@ -34,8 +34,9 @@ public:
|
||||
|
||||
virtual const RsPgpId &getPGPOwnId();
|
||||
virtual RsPgpId getPGPId(const RsPeerId& sslid);
|
||||
|
||||
virtual bool getKeyFingerprint(const RsPgpId& id,PGPFingerprintType& fp) const;
|
||||
|
||||
virtual bool parseSignature(unsigned char *sign, unsigned int signlen, RsPgpId& issuer) const;
|
||||
virtual bool VerifySignBin(const void *data, uint32_t len, unsigned char *sign, unsigned int signlen, const PGPFingerprintType& withfingerprint);
|
||||
virtual bool askForDeferredSelfSignature(const void *data, const uint32_t len, unsigned char *sign, unsigned int *signlen,int& signature_result );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user