CreaSign

Verify a Document on a Web Server

To verify a signature that was created in a web browser, follow these steps:

  1. Extract the data from a hidden field.
  2. Load the document from the data.
  3. Verify the signature.
  4. Validate the document.

The signed document is extracted from a hidden field edSignature, base64 decoded and loaded into CreaDoc.

<%@ Language=VBScript %>
<html> <body>
<%
  ' Decode and load the document that was submitted from the browser
  Set data=CreateObject("CreaSignClientIE.Data")   
data.DataAsBase64
=Request.Form("edSignature")

Set cs=CreateObject("CreaSignClientIE.CreaDoc")
cs.Load data

set vr=cs.Verify(1) ' 1= do not check for revocation in demo version %>

<!-- Validate the document. In this demo, we just print out the verification result and the document itself-->
Signature status:
<br> Signature OK:           <%= vr.OK %>
<br> Number of signatures:   <%= vr.Count %>
<br> Signed by:              <%= vr.Item(0).Signer.DisplayName %>
<br> Error message:          <%= vr.Item(0).ErrorMessage %>

<br><br>Signed document:<br>
<pre>
  <%=Server.HTMLEncode(cs.XmlNode.xml) %>
</pre>

</body> </html>

See the demo in "Verify a Signature of a CreaDoc Document" for a detailed example of signature verification.


Send comments on this topic.

(c) Crea 2002-2006