Changeset View
Changeset View
Standalone View
Standalone View
generators/poppler/pdfsignatureutils.h
- This file was added.
1 | /*************************************************************************** | ||||
---|---|---|---|---|---|
2 | * Copyright (C) 2018 by Chinmoy Ranjan Pradhan <chinmoyrp65@gmail.com> * | ||||
3 | * * | ||||
4 | * This program is free software; you can redistribute it and/or modify * | ||||
5 | * it under the terms of the GNU General Public License as published by * | ||||
6 | * the Free Software Foundation; either version 2 of the License, or * | ||||
7 | * (at your option) any later version. * | ||||
8 | ***************************************************************************/ | ||||
9 | | ||||
10 | #ifndef _OKULAR_GENERATOR_PDF_SIGNATUREINFO_H_ | ||||
11 | #define _OKULAR_GENERATOR_PDF_SIGNATUREINFO_H_ | ||||
12 | | ||||
13 | #include <poppler-form.h> | ||||
14 | | ||||
15 | #include "core/signatureutils.h" | ||||
16 | | ||||
17 | class PopplerCertificateInfo : public Okular::CertificateInfo | ||||
18 | { | ||||
19 | public: | ||||
20 | PopplerCertificateInfo(const Poppler::CertificateInfo &info); | ||||
21 | ~PopplerCertificateInfo(); | ||||
22 | | ||||
23 | bool isNull() const override; | ||||
24 | int version() const override; | ||||
25 | QByteArray serialNumber() const override; | ||||
26 | QString issuerInfo(EntityInfoKey) const override; | ||||
27 | QString subjectInfo(EntityInfoKey) const override; | ||||
28 | QDateTime validityStart() const override; | ||||
29 | QDateTime validityEnd() const override; | ||||
30 | KeyUsageExtensions keyUsageExtensions() const override; | ||||
31 | QByteArray publicKey() const override; | ||||
32 | PublicKeyType publicKeyType() const override; | ||||
33 | int publicKeyStrength() const override; | ||||
34 | bool isSelfSigned() const override; | ||||
35 | QByteArray certificateData() const override; | ||||
36 | | ||||
37 | private: | ||||
38 | Poppler::CertificateInfo *m_info; | ||||
39 | }; | ||||
40 | | ||||
41 | class PopplerSignatureInfo : public Okular::SignatureInfo | ||||
42 | { | ||||
43 | public: | ||||
44 | PopplerSignatureInfo( const Poppler::SignatureValidationInfo &info ); | ||||
45 | ~PopplerSignatureInfo(); | ||||
46 | | ||||
47 | SignatureStatus signatureStatus() const override; | ||||
48 | CertificateStatus certificateStatus() const override; | ||||
49 | QString signerName() const override; | ||||
50 | QString signerSubjectDN() const override; | ||||
51 | QString location() const override; | ||||
52 | QString reason() const override; | ||||
53 | HashAlgorithm hashAlgorithm() const override; | ||||
54 | QDateTime signingTime() const override; | ||||
55 | QByteArray signature() const override; | ||||
56 | QList<qint64> signedRangeBounds() const override; | ||||
57 | bool signsTotalDocument() const override; | ||||
58 | Okular::CertificateInfo *certificateInfo() const override; | ||||
59 | | ||||
60 | private: | ||||
61 | Poppler::SignatureValidationInfo *m_info; | ||||
62 | }; | ||||
63 | | ||||
64 | #endif |