keitn
keitn

Reputation: 1298

C# Multiple Digital Signatures on Documents

I have a requirement in a C# .net application to be able to add multiple digital signatures to a document. The document will be uploaded as a template then will go through several stages of processing (mail merge) and will then be downloaded. There is a requirement to have several parties each digitally sign it.

I have the following questions

1) Will each individual will need a seperate cert to sign with. 2) Are my options to install office on the webserver or to purchase 3rd party components. 3) I would greatly appreciate any examples in c#/.net (either with docx or pdf to demonstrate this)

Upvotes: 2

Views: 2541

Answers (2)

  1. Each individual usually signs the document for himself, thus confirming that he's the author or that he authorizes the document. In this case s/he uses own certificate with a private key. It is also possible that several people share the same certificate and a key (eg. several VPs each of them having the right to approve certain document).

  2. You can use some Office automation or you can use some third-party library such as our SecureBlackbox (among other features it supports PDF signing, Office document signing and XML signing using format-specific signature standards, and also CMS/CAdES "generic" signing). Samples are included into the downloadable package.

Note that PDF format doesn't support having several independent signatures. Office signature formats do support independent signatures (moreover, in binary formats countersigning is not possible).

Upvotes: 1

Manish Mishra
Manish Mishra

Reputation: 12375

Below am writing a code using DocuSign WebService to send document to be signed by multiple parties: you can get the WebService(.asmx) url from their Site and steps on how to add this Service Reference to your project.

You can get details on what is Envelope or Tabs from here

Envelope envelope = new Envelope();
envelope.Subject = subject;
envelope.EmailBlurb = "This is Awesome. Kung fu Panda is just awesome";
envelope.AccountId = ConfigurationManager.AppSettings["APIAccountId"];

Recipient recipient = new Recipient();
recipient.UserName = name;
recipient.Email = txtRecipientEmail.Text;
recipient.ID = "1";
recipient.Type = RecipientTypeCode.Signer;

//here you can add multiple recipients
envelope.Recipients = new Recipient[] { recipient };


Document document = new Document();
document.PDFBytes =  FileHelper.StreamToByteArray(fileUploadTool1.FileContent );
document.FileExtension = Path.GetExtension(fileUploadTool1.PostedFile.FileName);
document.Name = Path.GetFileName(fileUploadTool1.PostedFile.FileName);
document.ID = "1";
envelope.Documents = new Document[] { document };

Tab tab1 = new Tab();
tab1.RecipientID = "1";
tab1.PageNumber = "1";
tab1.DocumentID = "1";
tab1.Type = TabTypeCode.SignHere;
tab1.XPosition = "50";
tab1.YPosition = "200";

Tab tab2 = new Tab();
tab2.RecipientID = "1";
tab2.PageNumber = "1";
tab2.DocumentID = "1";
tab2.Type = TabTypeCode.DateSigned;
tab2.XPosition = "110";
tab2.YPosition = "225";

envelope.Tabs = new Tab[] { tab1, tab2 };
APIServiceSoapClient proxy = Get_Proxy();
EnvelopeStatus status = proxy.CreateAndSendEnvelope(envelope);
StatusLabel.Text = "The envelope is " + status.Status.ToString() + ".";

Upvotes: 1

Related Questions