disable NSS/GPGMEPP dependent code. --- poppler/poppler/Form.cc.orig 2023-06-05 19:29:14.000000000 +0900 +++ poppler/poppler/Form.cc 2023-06-17 16:51:27.873431500 +0900 @@ -64,7 +64,7 @@ #include "Form.h" #include "PDFDoc.h" #include "DateInfo.h" -#include "CryptoSignBackend.h" +/*#include "CryptoSignBackend.h"*/ #include "SignatureInfo.h" #include "CertificateInfo.h" #include "XRef.h" @@ -578,7 +578,7 @@ { return static_cast(field)->validateSignature(doVerifyCert, forceRevalidation, validationTime, ocspRevocationCheck, enableAIA); } - +#if 0 // update hash with the specified range of data from the file static bool hashFileRange(FILE *f, CryptoSign::SigningInterface *handler, Goffset start, Goffset end) { @@ -608,10 +608,12 @@ delete[] buf; return true; } +#endif bool FormWidgetSignature::signDocument(const std::string &saveFilename, const std::string &certNickname, const std::string &password, const GooString *reason, const GooString *location, const std::optional &ownerPassword, const std::optional &userPassword) { +#if 0 auto backend = CryptoSign::Factory::createActive(); if (!backend) { return false; @@ -697,8 +699,8 @@ signatureField->setSignature(*signature); fclose(file); - - return true; +#endif + return false; } static std::tuple calculateDxDy(int rot, const PDFRectangle *rect) @@ -2355,6 +2357,7 @@ void FormFieldSignature::hashSignedDataBlock(CryptoSign::VerificationInterface *handler, Goffset block_len) { +#if 0 if (!handler) { return; } @@ -2374,6 +2377,7 @@ i += BLOCK_SIZE; } } +#endif } FormSignatureType FormWidgetSignature::signatureType() const @@ -2388,6 +2392,7 @@ SignatureInfo *FormFieldSignature::validateSignature(bool doVerifyCert, bool forceRevalidation, time_t validationTime, bool ocspRevocationCheck, bool enableAIA) { +#if 0 auto backend = CryptoSign::Factory::createActive(); if (!backend) { return signature_info; @@ -2464,6 +2469,7 @@ const CertificateValidationStatus cert_val_state = signature_handler->validateCertificate(std::chrono::system_clock::from_time_t(validationTime), ocspRevocationCheck, enableAIA); signature_info->setCertificateValStatus(cert_val_state); +#endif return signature_info; }