SecureBlackbox 16: How do I use distributed signing without a client-side browser module (I have a client desktop application)?
Note: This article applies only to SecureBlackbox Legacy. For future development please consider using the latest version.
A number of classes have been extended with extra distributed signing-related methods. Follow the steps below for PDFBlackbox. Distributed signing works similarly with other SecureBlackbox components.Note: The client here denotes a side holds a document or other data to sign (usually a web server or an application server). The server is the party that possesses the certificate with a private key and that signs the hash (usually a web browser or a client's desktop application).
I. Preparation (client side)
- Open the document and add a signature just as you do when signing the document in the usual (nondistributed) way.
- Instead of calling Close(), call the InitiateAsyncOperation() method. It will return a TElDCAsyncState object, which contains the information needed to perform the signing.
- Serialize state information to a stream with the use of its SaveToStream() method. Pass a TElDCXMLEncoding object to the Encoding parameter (this is the only encoding supported at the moment).
- Send the serialized state to the signing party (server).
II. Signing (server side)
- Create TElDCStandardServer and TElDCX509SignOperationHandler objects. Set up the latter by assigning a nonempty certificate storage to its CertStorage property and pass it to the TElDCStandardServer.AddOperationHandler() method.
- Pass the data received from the client to the TElDCStandardServer.Process() method. This method will return you the signing result.
- Send the obtained signing result back to the client.
III. Finalization (client side)
- Load the result from signing obtained from the server into a new TElDCAsyncResult instance.
- Pass the TElDCAsyncResult object along with the opened PDF document stream and a setup security handler object to the TElPDFDocument.CompleteAsyncOperation() method.
We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at email@example.com.