mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-30 09:56:14 -05:00
48 lines
2.4 KiB
C++
48 lines
2.4 KiB
C++
/*******************************************************************************
|
|
* unittests/libretroshare/services/gxs/FakePgpAuxUtils.h *
|
|
* *
|
|
* Copyright 2014 by Robert Fernie <retroshare.project@gmail.com> *
|
|
* *
|
|
* This program is free software: you can redistribute it and/or modify *
|
|
* it under the terms of the GNU Affero General Public License as *
|
|
* published by the Free Software Foundation, either version 3 of the *
|
|
* License, or (at your option) any later version. *
|
|
* *
|
|
* This program is distributed in the hope that it will be useful, *
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
* GNU Lesser General Public License for more details. *
|
|
* *
|
|
* You should have received a copy of the GNU Lesser General Public License *
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
|
* *
|
|
******************************************************************************/
|
|
|
|
#pragma once
|
|
|
|
#include "pgp/pgpauxutils.h"
|
|
|
|
class FakePgpAuxUtils: public PgpAuxUtils
|
|
{
|
|
public:
|
|
FakePgpAuxUtils(const RsPeerId& ownId);
|
|
|
|
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 , std::string reason);
|
|
|
|
virtual void addPeerListToPgpList(const std::list<RsPeerId> &ids);
|
|
virtual void addPeerIdToPgpList(const RsPeerId &id);
|
|
virtual bool getGPGAllList(std::list<RsPgpId> &ids);
|
|
private:
|
|
RsPgpId mOwnId;
|
|
std::list<RsPgpId> mPgpList;
|
|
|
|
};
|
|
|
|
|