Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

SWS provides REST interface for Pades and Cades signatures for very large files (you can sign files over 1GB). Without any problem with appliance memory as it handles files with a stream.

At this link:

Code Block
http://<IP-APPLIANCE>:8080/SignEngineWeb/rest/service

You can find this two method:

  • signPAdES
  • signCAdES


signPAdES


Below is the example of signPAdES request with CURL:

Code Block
curl --form 'credentials="{\"username\":\"DEVICENAME\",\"password\":\"PASSWORD\"}";type=application/json' --form 'preferences="{\"page\":\"1\",\"hashAlgorithm\":\"SHA256\", \"withTimestamp\": \"false\"}";type=application/json' --form file=@FILE_TO_BE_SIGNED.pdf --request POST http://localhost<IP-APPLIANCE>:8080/SignEngineWeb/rest/service/signPAdES --output FILE_SIGNED.pdf


In this example, we are signing the file: "FILE_TO_BE_SIGNED.pdf" and the file signed will be saved in "FILE_SIGNED.pdf".

signCAdES

Below is the example of signCAdES with CURL:

Code Block
curl --form 'credentials="{\"username\":\"DEVICENAME\",\"password\":\"PASSWORD\"}";type=application/json' --form 'preferences="{\"hashAlgorithm\":\"SHA256\"}";type=application/json' --form file=@FILE_TO_BE_SIGNED.txt --request POST http://localhost<IP-APPLIANCE>:8080/SignEngineWeb/rest/service/signCAdES --output FILE_SIGNED.txt.p7m


In this example, we are signing the file: "FILE_TO_SIGNED.txt" and the file signed will be saved in "FILE_SIGNED.txt.p7m"