2018-11-04 15:17:22 -05:00
|
|
|
/*******************************************************************************
|
|
|
|
* unittests/libretroshare/services/gxs/FakePgpAuxUtils.h *
|
|
|
|
* *
|
2018-11-11 14:42:48 -05:00
|
|
|
* 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/>. *
|
|
|
|
* *
|
|
|
|
******************************************************************************/
|
2014-04-27 09:26:14 -04:00
|
|
|
|
|
|
|
#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);
|
2014-04-27 09:26:14 -04:00
|
|
|
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;
|
2014-04-27 09:26:14 -04:00
|
|
|
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);
|
2014-04-27 09:26:14 -04:00
|
|
|
private:
|
|
|
|
RsPgpId mOwnId;
|
|
|
|
std::list<RsPgpId> mPgpList;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|