Warning, file /utilities/isoimagewriter/isoimagewriter/isoverifier.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002     SPDX-FileCopyrightText: 2019 Farid Boudedja <farid.boudedja@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-3.0-or-later
0005 */
0006 
0007 #ifndef ISOVERIFIER_H
0008 #define ISOVERIFIER_H
0009 
0010 #include <QObject>
0011 
0012 class IsoVerifier : public QObject
0013 {
0014     Q_OBJECT
0015 
0016 public:
0017     explicit IsoVerifier(const QString &filePath);
0018 
0019     enum class VerifyResult {
0020         Successful,
0021         Failed,
0022         KeyNotFound,
0023         NoGpg,
0024     };
0025     Q_ENUM(VerifyResult);
0026 
0027 public slots:
0028     void verifyIso();
0029     void verifyWithInputText(bool ok, const QString &text);
0030 
0031 signals:
0032     void finished(IsoVerifier::VerifyResult result, const QString &error);
0033     void inputRequested(const QString &title, const QString &body);
0034 
0035 private:
0036     QString m_filePath;
0037     QString m_error;
0038     VerifyResult m_isIsoValid = VerifyResult::Failed;
0039     enum VerificationMean {
0040         None,
0041         DotSigFile,
0042         Sha256SumsFile,
0043         Sha256SumInput
0044     } m_verificationMean;
0045 
0046     bool importSigningKey(const QString &fileName, QString &keyFingerPrint);
0047     void verifyWithDotSigFile(const QString &keyFingerPrint);
0048     void verifyWithSha256SumsFile(const QString &keyFingerPrint);
0049     void verifyWithSha256Sum(bool ok, const QString &checksum);
0050 };
0051 
0052 #endif // ISOVERIFIER_H