You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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:

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:

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: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:

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: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"

  • No labels