2021-05-02 18:22:38 +00:00
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
2022-02-10 10:26:41 +00:00
|
|
|
// SPDX-FileCopyrightText: 2020-2022 The Monero Project
|
2021-05-02 18:22:38 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QPair>
|
|
|
|
#include <QNetworkReply>
|
|
|
|
|
|
|
|
#include <openpgp/openpgp.h>
|
|
|
|
|
|
|
|
class Updater
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit Updater();
|
|
|
|
|
|
|
|
QByteArray verifyParseSignedHashes(const QByteArray &armoredSignedHashes, const QString &binaryFilename, QString &signers) const;
|
|
|
|
|
|
|
|
QByteArray getHash(const void *data, size_t size) const;
|
|
|
|
QString verifySignature(const QByteArray &armoredSignedMessage, QString &signer) const;
|
|
|
|
QByteArray parseShasumOutput(const QString &message, const QString &filename) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
QString verifySignature(const epee::span<const uint8_t> data, const openpgp::signature_rsa &signature) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::vector<openpgp::public_key_block> m_maintainers;
|
|
|
|
};
|