Sign files electronically with DSS

Plaidshirt Tester
2 min readFeb 18, 2019

--

SD-DSS is the European free and open-source tool to create and verify electronic signatures. It is available for download from Github repository: https://github.com/esig/dss

There is a cookbook and a lot of demonstrations about usage of DSS: https://github.com/esig/dss-demonstrations

One these is a demo webapp, which is not recommended to be used in production, but gives a lot of examples and best practices about integration. You can download package from here: https://ec.europa.eu/cefdigital/wiki/display/CEFDIGITAL/DSS+releases or build your own from dss-demonstartions Github repository. It is faster to rebuild root project instead of subprojects. Demo webapp uses a built-in p12 certificate file for server-signing process, so you need to make a new build if you want to change it for your own. You can use Maven Lifecycle plugins for this purpose if you use an IDE or just simply execute following command: mvn clean install. To sign a document with use of SOAP webservice, you need to go through following steps, need to call following services: (Signature operation is delegated to NexU when you call it from user interface. NexU Bundle is available for download from here: https://github.com/nowina-solutions/nexu/releases)

  • getDataToSign : computes the data from input document to be signed
  • sign : signs the previous result with a smartcard, keystore, HSM, etc. to create signatureValue
  • signDocument : creates the signed document with the given signatureValue

The parameter values in getDataToSign and signDocument methods must be equals. To get alias of your signer certificate you need to execute getKeys request. dss-cookbook offers also a sample SoapUI project with all the available SOAP requests: https://github.com/esig/dss/tree/master/dss-cookbook/src/main/soapui

Source of image: http://www.stjude.edu.in

--

--