[ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16662581#comment-16662581
 ] 

Tilman Hausherr edited comment on PDFBOX-4312 at 10/24/18 5:26 PM:
-------------------------------------------------------------------

It's what I explained in September, that signing will only work if you 
calculate the signature from the input stream at the time sign() is called. 
What you are doing is to calculate the signature at an earlier time, when the 
PDF doesn't exist in its signed form. The signature covers both the original 
PDF and the incremental save part, except the signature itself.
 
To insert the signature and the byterange at the proper place you need to write 
some code yourself, as explained by me on October 22 in the long comment.


was (Author: tilman):
It's what I explained in September, that it will only work if you calculate the 
signature from the input stream at the time sign() is called. What you are 
doing is to calculate the signature at an earlier time, when the PDF doesn't 
exist in its signed form. The signature covers both the original PDF and the 
incremental save part, except the signature itself.
 
To insert the signature and the byterange at the proper place you need to write 
some code yourself, as explained by me on October 22 in the long comment.

> Signature is not getting inserted into 00000 area
> -------------------------------------------------
>
>                 Key: PDFBOX-4312
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4312
>             Project: PDFBox
>          Issue Type: Bug
>          Components: .NET, PDModel, Signing
>    Affects Versions: 1.8.9, 1.8.15
>            Reporter: bal
>            Priority: Major
>             Fix For: 1.8.17
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org

Reply via email to