Skip to Main ContentWindow-Eyes  Braille Sense  CCTV  Voice Sense  SyncBraille  Support  Training
GW Micro - Unleashing the power of your mind's eye.
 

Mimicking WESign Functionality - GWWiki

(Difference between revisions)
Jump to: navigation, search
(CAPICOM.Signer)
(CAPICOM.SignedData)
Line 18: Line 18:
 
== CAPICOM.SignedData ==
 
== CAPICOM.SignedData ==
  
The SignedData object, among other things, is a container for digitally signed data, holding both the data and the certificate used for signing (obtained from the Signer object). To load and sign data, do the following:
+
The SignedData object, among other things, is a container for digitally signed data, holding both the data and the certificate used for signing (obtained from the Signer object). To load and sign content, do the following:
  
 
  Set SignedData = CreateObject("CAPICOM.SignedData")
 
  Set SignedData = CreateObject("CAPICOM.SignedData")

Revision as of 13:47, 8 July 2011

Mimicking WESign Functionality

The Window-Eyes WESign app provides app developers with the ability to create digitally signed content, typically used with paid apps to validate serial numbers or other license criteria.

WESign employs the CAPICOM COM client to sign string data using a digital certificate. The process of signing content can be completed using two CAPICOM objects: Signer and SignedData.

CAPICOM.Signer

The Signer object is a container of signer information obtained from a digital certificate. A digital signature can be verified by a certificate authority or can be self-signed. For the purposes of signed content for apps, a self-signed certificate is acceptable. Information on creating a self-signed certificate can be found in the Creating Digitally Signed Content article.

To load certificate data into a Signer object, do the following:

Set Signer = CreateObject("CAPICOM.Signer")
Signer.Load "path\to\certificate", "password for certificate"

Once the Signer has loaded certificate data successfully, it can be used with the SignedData object to sign content.

CAPICOM.SignedData

The SignedData object, among other things, is a container for digitally signed data, holding both the data and the certificate used for signing (obtained from the Signer object). To load and sign content, do the following:

Set SignedData = CreateObject("CAPICOM.SignedData")
SignedData.Content = "This is the text to be signed"
strSignedContent = SignedData.Sign(Signer)

The SignedData object also encodes the content using base64 encoding. The final signed, encoded content may look something like:

PT0gTWltaWNraW5nIFdFU2lnbiBGdW5jdGlvbmFsaXR5ID09DQoNClRoZSBXaW5kb3ctRXllcyBbaHR0
cDovL3d3dy5nd21pY3JvLmNvbS9hcHBzL3dlc2lnbiBXRVNpZ25dIGFwcCBwcm92aWRlcyBhcHAgZGV2
ZWxvcGVycyB3aXRoIHRoZSBhYmlsaXR5IHRvIGNyZWF0ZSBkaWdpdGFsbHkgc2lnbmVkIGNvbnRlbnQs
IHR5cGljYWxseSB1c2VkIHdpdGggcGFpZCBhcHBzIHRvIHZhbGlkYXRlIHNlcmlhbCBudW1iZXJzIG9y
IG90aGVyIGxpY2Vuc2UgY3JpdGVyaWEuDQoNCldFU2lnbiBlbXBsb3lzIHRoZSBbaHR0cDovL21zZG4u
bWljcm9zb2Z0LmNvbS9lbi11cy9saWJyYXJ5L2FhMzc1NzMyKFZTLjg1KS5hc3B4IENBUElDT01dIENP
TSBjbGllbnQgdG8gc2lnbiBzdHJpbmcgZGF0YSB1c2luZyBhIGRpZ2l0YWwgY2VydGlmaWNhdGUuIFRo
ZSBwcm9jZXNzIG9mIHNpZ25pbmcgY29udGVudCBjYW4gYmUgY29tcGxldGVkIHVzaW5nIHR3byBDQVBJ
Q09NIG9iamVjdHM6IF

A Window-Eyes app can use the verification process discussed in the Creating Digitally Signed Content article to validate the content, and act appropriately.


Text Size:
Decrease Text Size Increase Text Size

Personal tools

Powered by MediaWiki
Public Domain
© 2013 GW Micro, Inc. All Rights Reserved.
GW Micro, Inc.    725 Airport North Office Park    Fort Wayne, IN 46825
Ph: 260-489-3671 Fax: 260-489-2608    www.gwmicro.com    sales@gwmicro.com    support@gwmicro.com
Hours: M-F, 8a-5p, EDST