EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Signing PDF twice with two certificates

Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.
#5265
Posted: 03/03/2008 20:30:50
by Ben Loomis (Basic support level)
Joined: 08/18/2006
Posts: 9

I tried creating two signature fields in Acrobat Pro, then signing the first one with a Certifying Signature, with only form fill allowed.
This let me sign the second one normally, and both signatures are valid (under Document Details for the first signature, it says "The changes that have been made to this document since the signature was applied are permitted by the document author.")

I think this method will work for what I need. Is this functionality not supported (or not supported well) by SecureBlackbox?
#5266
Posted: 03/04/2008 01:16:52
by Ken Ivanov (EldoS Corp.)

Quote
revision i meant. Reader is saying "the same revision", so may be there is some way to change it to revision +1 so the warning goes out.

"Revision" is not something that is explicitly specified. Adobe Reader considers the original document as the first revision, the first modification of it as the second revision and so on.

Quote
It looks like that method would be to create the signature field, then sign the document with a certification signature and only allow that field to be filled in, then the document could be signed again and there wouldn't be a warning.

Yes, it seems to be a solution. SecureBlackbox does not support form fields creation at the moment. I've added the corresponding entry to the to do list.

Quote
Is that correct? I can't find anything about it being not recommended on Adobe's documentation.

Well, it is not recommended by us as many products do not support MDP signatures correctly, so this type of signatures should be used with care. Actually, the formulation is a bit inaccurate. Thank you for pointing us at this, the text will be fixed.
#5320
Posted: 03/07/2008 20:21:14
by Ben Loomis (Basic support level)
Joined: 08/18/2006
Posts: 9

Quote
SecureBlackbox does not support form fields creation at the moment.

Does this include blank signature fields that could be signed at a later date?
Quote
Actually, the formulation is a bit inaccurate. Thank you for pointing us at this, the text will be fixed.

The functionality should work if I use the flag for MDP, right? I'm not concerned about readers other than the Adobe reader.
#5322
Posted: 03/08/2008 02:12:50
by Ken Ivanov (EldoS Corp.)

Quote
Does this include blank signature fields that could be signed at a later date?

SecureBlackbox does not support *creation* of form fields (including blank signature fields). Signing existing fields (i.e. the fields that have been added to the document by some other software prior to passing the document to SecureBlackbox) is supported though.

Quote
The functionality should work if I use the flag for MDP, right? I'm not concerned about readers other than the Adobe reader.

Exactly.
#5347
Posted: 03/11/2008 20:27:25
by Ben Loomis (Standard support level)
Joined: 03/11/2008
Posts: 1

OK, I'm trying this on a document that I made two blank fields in, using Acrobat Pro.
This document has two empty signature fields on the first page.
When I used the empty signature field, it signed it OK but no text shows up on the signature field. If I click the field it verifies it OK, but I need the usual text and background to be added.
The relevant code snippet is below.
The code worked fine on a blank document where I was creating the field then immediately signing it.

Code
' variable definitions, document opening code, etc. cut for length.

numsigs = Document.SignatureCount
numblanks = Document.EmptySignatureFieldCount
If (numblanks < 1) Then
   'fail
Else
    index = Document.AddSignature(0)
    Sig = Document.Signatures(index)
End If
If (numsigs >= 1) Then
    Sig.SignatureType = SBPDF.Unit.stDocument
Else
    Sig.SignatureType = SBPDF.Unit.stMDP
    Sig.AllowedChanges = SBPDF.Unit.sacFillInForms
End If

Sig.Page = 0
Sig.Reason = reason
Sig.WidgetProps.BackgroundStyle = TSBPDFWidgetBackgroundStyle.pbsCustom
Sig.WidgetProps.ShowOnAllPages = False
Sig.WidgetProps.Background.Data = bgdata
Sig.WidgetProps.Background.Width = 200
Sig.WidgetProps.Background.Height = 200
Sig.WidgetProps.AutoSize = False
Sig.WidgetProps.Height = 150
Sig.WidgetProps.Width = 150
Sig.WidgetProps.AutoFontSize = False
Sig.WidgetProps.SectionTextFontSize = 3
Sig.WidgetProps.SectionTitleFontSize = 3
Sig.WidgetProps.TitleFontSize = 5

Sig.Handler = PublicKeyHandler
Sig.AuthorName = Cert.SubjectName.CommonName
Sig.SigningTime = DateTime.Now

Sig.Invisible = False

CertStorage.Clear()
CertStorage.Add(Cert, True)
PublicKeyHandler.CertStorage = CertStorage
PublicKeyHandler.SignatureType = TSBPDFPublicKeySignatureType.pstPKCS7SHA1
PublicKeyHandler.CustomName = "Adobe.PPKMS"

#5348
Posted: 03/12/2008 02:00:58
by Ken Ivanov (EldoS Corp.)

By default, TElPDFDocument leaves existing signature widgets (blank signature field is a signature widget too) unchanged. Please set TElPDFSignature.WidgetProps.IgnoreExistingAppearance to true to override this setting.
#5416
Posted: 03/13/2008 18:21:46
by Ben Loomis (Basic support level)
Joined: 08/18/2006
Posts: 9

Quote
Please set TElPDFSignature.WidgetPro ps.IgnoreExistingAppearan ce to true to override this setting.

That did the trick. Thanks!
#8577
Posted: 01/08/2009 10:21:54
by Olivier Wallemacq (Basic support level)
Joined: 01/05/2009
Posts: 22

Hello,
I am doing something similar on a pdf Form created with acrobat designer 7.
It works fine with TElPDFSignature.WidgetPro­ ps.IgnoreExistingAppearan­ce set to false except of course that the signature appears empty.
When I set ignoreexistingappearance to true then the signature appears as i want to but the certification becomes invalid (first sig was mdp / allowformchange).
The modifications in signature properties > document > document modification of the resulting pdf are:
1 form field(s) modified
field labeled form1[0].#subform[0].signaturefield3[0] on page 1
1 form field(s) modified
field labeled form1[0].#subform[0].signaturefield3[0] on page 1
1 miscellaneous changes
Do you know where this could come from ?
with thanks in advance.
Laurent
Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.

Reply

Statistics

Topic viewed 11869 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!