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" @@ -584,7 +584,7 @@ { return static_cast(field)->validateSignatureResult(); } - +#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 @@ -2395,6 +2399,7 @@ SignatureInfo *FormFieldSignature::validateSignatureAsync(bool doVerifyCert, bool forceRevalidation, time_t validationTime, bool ocspRevocationCheck, bool enableAIA, const std::function &doneCallback) { +#if 0 auto backend = CryptoSign::Factory::createActive(); if (!backend) { if (doneCallback) { @@ -2497,6 +2502,7 @@ signature_handler->validateCertificateAsync(std::chrono::system_clock::from_time_t(validationTime), ocspRevocationCheck, enableAIA, doneCallback); +#endif return signature_info; } @@ -2508,10 +2508,13 @@ CertificateValidationStatus FormFieldSignature::validateSignatureResult() { +#if 0 if (!signature_handler) { return CERTIFICATE_GENERIC_ERROR; } return signature_handler->validateCertificateResult(); +#endif + return CERTIFICATE_GENERIC_ERROR; } std::vector FormFieldSignature::getSignedRangeBounds() const --- poppler/poppler/Form.h 2024-05-13 10:18:04.303912457 +0200 +++ poppler/poppler/Form.h 2024-05-13 11:41:51.547002511 +0200 @@ -669,7 +669,6 @@ double customAppearanceLeftFontSize = 20; Ref imageResource = Ref::INVALID(); std::unique_ptr certificate_info; - std::unique_ptr signature_handler; void print(int indent) override; };