Remove duplicated include
[LibreOffice.git] / external / poppler / disable-nss-and-gpgmepp.patch.1
blob1d7f7f9334334c53305b84ba6f27507e4cfcf7a1
1 disable NSS/GPGMEPP dependent code.
3 --- poppler/poppler/Form.cc.orig        2023-06-05 19:29:14.000000000 +0900
4 +++ poppler/poppler/Form.cc     2023-06-17 16:51:27.873431500 +0900
5 @@ -64,7 +64,7 @@
6  #include "Form.h"
7  #include "PDFDoc.h"
8  #include "DateInfo.h"
9 -#include "CryptoSignBackend.h"
10 +/*#include "CryptoSignBackend.h"*/
11  #include "SignatureInfo.h"
12  #include "CertificateInfo.h"
13  #include "XRef.h"
14 @@ -578,7 +578,7 @@
15  {
16      return static_cast<FormFieldSignature *>(field)->validateSignature(doVerifyCert, forceRevalidation, validationTime, ocspRevocationCheck, enableAIA);
17  }
19 +#if 0
20  // update hash with the specified range of data from the file
21  static bool hashFileRange(FILE *f, CryptoSign::SigningInterface *handler, Goffset start, Goffset end)
22  {
23 @@ -608,10 +608,12 @@
24      delete[] buf;
25      return true;
26  }
27 +#endif
29  bool FormWidgetSignature::signDocument(const std::string &saveFilename, const std::string &certNickname, const std::string &password, const GooString *reason, const GooString *location, const std::optional<GooString> &ownerPassword,
30                                         const std::optional<GooString> &userPassword)
31  {
32 +#if 0
33      auto backend = CryptoSign::Factory::createActive();
34      if (!backend) {
35          return false;
36 @@ -697,8 +699,8 @@
37      signatureField->setSignature(*signature);
39      fclose(file);
41 -    return true;
42 +#endif
43 +    return false;
44  }
46  static std::tuple<double, double> calculateDxDy(int rot, const PDFRectangle *rect)
47 @@ -2355,6 +2357,7 @@
49  void FormFieldSignature::hashSignedDataBlock(CryptoSign::VerificationInterface *handler, Goffset block_len)
50  {
51 +#if 0
52      if (!handler) {
53          return;
54      }
55 @@ -2374,6 +2377,7 @@
56              i += BLOCK_SIZE;
57          }
58      }
59 +#endif
60  }
62  FormSignatureType FormWidgetSignature::signatureType() const
63 @@ -2388,6 +2392,7 @@
65  SignatureInfo *FormFieldSignature::validateSignature(bool doVerifyCert, bool forceRevalidation, time_t validationTime, bool ocspRevocationCheck, bool enableAIA)
66  {
67 +#if 0
68      auto backend = CryptoSign::Factory::createActive();
69      if (!backend) {
70          return signature_info;
71 @@ -2464,6 +2469,7 @@
72      const CertificateValidationStatus cert_val_state = signature_handler->validateCertificate(std::chrono::system_clock::from_time_t(validationTime), ocspRevocationCheck, enableAIA);
73      signature_info->setCertificateValStatus(cert_val_state);
75 +#endif
76      return signature_info;
77  }