RetroShare/tests/unittests/libretroshare/services/gxs/FakePgpAuxUtils.h

47 lines
2.3 KiB
C
Raw Normal View History

2018-11-04 15:17:22 -05:00
/*******************************************************************************
* unittests/libretroshare/services/gxs/FakePgpAuxUtils.h *
* *
* Copyright 2014 by Robert Fernie <retroshare.project@gmail.com> *
2018-11-04 15:17:22 -05:00
* *
* 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();
2021-10-29 14:29:18 -04:00
virtual RsPgpId getPgpId(const RsPeerId& sslid);
virtual bool getKeyFingerprint(const RsPgpId& id,PGPFingerprintType& fp) const;
2016-04-04 11:18:42 -04:00
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 void addPeerListToPgpList(const std::list<RsPeerId> &ids);
virtual void addPeerIdToPgpList(const RsPeerId &id);
2021-10-29 14:29:18 -04:00
virtual bool getPgpAllList(std::list<RsPgpId> &ids);
private:
RsPgpId mOwnId;
std::list<RsPgpId> mPgpList;
};