Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Signature Error
  FAQ FAQ  Forum Search   Register Register  Login Login

Signature Error

 Post Reply Post Reply
Author
Message
TBrady12 View Drop Down
Beginner
Beginner
Avatar

Joined: 29 Nov 21
Location: Canada
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote TBrady12 Quote  Post ReplyReply Direct Link To This Post Topic: Signature Error
    Posted: 30 Nov 21 at 1:51AM
I use DPLNewSignProcessFromFile and other functions rather than DPLSignFile,
and those functions work fine, but it worked weird with one Windows10 environment.
The resulting PDF file contains only '0' as signature, yet still no error
from DPL functions with this case.
Acrobat Reader says, of course, that the signature is invalid.

Does anybody know what's going on or see similar result? Any advice?


/Filter /Adobe.PPKLite
/SubFilter /adbe.pkcs7.detached
/Contents <0000000000000000000000000000000000000000 ....
/ByteRange [ 0 13275227 13275741 704
]
/M (D:20211118154446-05'00')
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (1) Thanks(1)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 01 Dec 21 at 8:08PM
Hi Tony,

only on one win10-system and on other win10-systems it works?
Can we take a look into the relevant code part you're using?
Here you can look into a sample about how to do it:
https://www.debenu.com/kb/advanced-options-signing-pdf-files/

Here's the description of the function and there you can read that pkcs12 is necessary - you wanna try it with pkcs7:
https://www.debenu.com/docs/pdf_library_reference/SignFile.php

Cheers and welcome here,
Ingo


Cheers,
Ingo

Back to Top
TBrady12 View Drop Down
Beginner
Beginner
Avatar

Joined: 29 Nov 21
Location: Canada
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote TBrady12 Quote  Post ReplyReply Direct Link To This Post Posted: 04 Dec 21 at 12:01AM

Hi Ingo, thank you for your response.

Yes, it worked on one Win-10 System, but not on the other Win-10 System.
 
PFX data is in PKCS12 format.
DPLSetSignProcessSubFilter only supports pkcs7 subfilter.

Here is the code we use.

// This function is a substitution of DPLSignFile function, as it lacks the ability to specify the hashing algorithm,
// DPLSetSignProcessSubFilter is doing the job in this function.

   int procID = DPLNewSignProcessFromFile(instanceID, inputFileName, openPassword);

   int rc = DPLSetSignProcessField(instanceID, procID, signatureFieldName);
   if (rc != DPL_SUCCESS) {
      return rc;
   }
   rc = DPLSetSignProcessInfo(instanceID, procID, reason, location , contactInfo);
   if (rc != DPL_SUCCESS) {
      return rc;
   }
   rc = DPLSetSignProcessSubFilter(instanceID, procID, 5 /*adbe_pkcs7_detached_with_sha512*/);
   if (rc != DPL_SUCCESS) {
      return rc;
   }
   rc = DPLSetSignProcessPFXFromString(instanceID, procID, pfxBuffer, pfxPassword);
   if (rc != DPL_SUCCESS) {
      return rc;
   }
   DPLEndSignProcessToFile(instanceID, procID, outputFileName);
   rc = DPLGetSignProcessResult(instanceID, procID);
   if (rc != DPL_SUCCESS) {
      return rc;
   }
   return rc;

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store