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!
![]() |
Signature Error |
Post Reply ![]() |
Author | |
TBrady12 ![]() Beginner ![]() ![]() Joined: 29 Nov 21 Location: Canada Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() 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') |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
TBrady12 ![]() Beginner ![]() ![]() Joined: 29 Nov 21 Location: Canada Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() |
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; |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store