PKISimple Remote Signature Server User Manual
Install a signing server on your own IIS web server, keep the keys of your organization on it (a PFX file, the Windows certificate store, or an HSM, smart card or USB token through PKCS#11), and let your applications sign PDF, CMS, XML and ASiC-E documents and hashes, and verify signatures, through a REST API or the CSC API.
1. What is PKISimple Remote Signature Server?
This is the user manual of PKISimple Remote Signature Server 2.1. It explains how to install the server on your own IIS web server, how to give it the certificates of your organization, and how your applications sign and verify documents through its REST API and its CSC API. The latest version of the manual is at https://signfiles.com/manuals/signature-server.
1.1 Server-side signing in a few words
PKISimple Remote Signature Server signs documents and hashes on the server, with the certificates of your organization, for the applications that you authorize. The private keys stay on the server or on its hardware device: an application sends a document or its hash and receives it signed. The same server verifies signatures for the applications and on its own Verify Signatures page, with eIDAS qualification read from the EU trusted lists.
The server runs as an application of Microsoft IIS on your own Windows server and keeps all its data in one SQLite database file in its own folder: no database server is needed. It belongs to the PKISimple family with PKISimple CA Server and PKISimple TSA Server and shares their administration pages, installation, audit trail and backups. Any RFC 3161 time-stamp server, PKISimple TSA Server among them, gives its signatures the time-stamps of levels B-T, B-LT and B-LTA.
1.2 Three things to configure
- Signing certificates: the certificates the server signs with. The key stays where it is: in a PFX file kept by the server, in the Windows certificate store, or on an HSM, smart card or USB token (PKCS#11) (chapter 7).
- Profiles: named recipes that say how to sign (PAdES, CAdES, XAdES, ASiC-E or a raw hash signature, the level, the time-stamp server) and with which certificate (chapter 9).
- Clients: the applications allowed to sign, each with its own API key and the profiles it may use (chapter 10).
A client sends the name of a profile and the document; everything else comes from the profile. A client can change only the fields that the profile marks Overridable. A new installation starts with a test signing certificate and five ready profiles, so the first signature takes minutes (Quick start).
1.3 What it signs and verifies
| Type | What the client sends | What it gets back |
|---|---|---|
| Hash | a digest (SHA-256, SHA-384, SHA-512) | the raw signature value (RSA PKCS#1 v1.5, RSA-PSS or ECDSA) and the certificate chain |
| PAdES | a PDF document | the signed PDF, levels B-B, B-T, B-LT, B-LTA |
| CAdES | any file | a CMS signature, attached (.p7m) or detached (.p7s), levels B-B … B-LTA |
| XAdES | an XML document or any file | the XML with an enveloped signature, or a detached XML signature, levels B-B … B-LTA |
| ASiC-E | several files | an .asice container with one XAdES signature |
| Verification | a signed document (and the originals of a detached signature) | a report of every signature: valid, invalid or not verifiable, with the reasons, the exact ETSI profile and the eIDAS qualification |
The applications use the REST API (chapter 16) or the CSC API v2 of the Cloud Signature Consortium (chapter 17), with sample programs in nine languages (chapter 18). Documents are signed and verified in memory and never stored.
| Part | What it does |
|---|---|
The REST API (api/v1) | Signing with a profile, verification, the profiles of a client, health; Swagger documentation (chapter 16). |
The CSC API (csc/v2) | signHash and signDoc for applications that speak the Cloud Signature Consortium API (chapter 17). |
| The administration pages | Signing certificates, profiles, clients, Configuration, Trusted Certificates, the Audit Trail, Transactions, Status, Backup and Restore, registration (The main page and the navigation). |
| Tools | Sign a Test Document and Verify Signatures, with downloads of the original document, of every PDF revision and of the signing certificates (Testing the server). |
| Logs and status | An Audit Trail protected by a hash chain (chapter 12), a transaction log of every request (chapter 13), and a Status page with daily tests (chapter 14). |
1.4 The two editions
Licensed edition (RemoteSignatureServer.zip) | Source Edition (RemoteSignatureServer-SourceEdition.zip) | |
|---|---|---|
| License agreement at the first start | yes | no |
| Administrator login | yes (chapter 6) | no: every visitor of the pages is the administrator |
| Trial | 45 days, 5,000 signatures and 5,000 verifications, then a license (chapter 19) | no limit |
| Default profiles | B-B, freely editable | B-T with the signfiles.com time-stamp server; locked with their test certificate |
| Client of the samples | — | api-samples, with a fixed public API key and CSC PIN: the API samples run against it as they are |
| API samples | the folder ApiSamples of the package | also Download the API Samples on the Configuration page |
Everything else works in the same way. The Source Edition is meant for developers and test networks: install it where you trust everybody who can reach it.
1.5 Useful links
| What | Address |
|---|---|
| Product page | https://signfiles.com/signature-server |
| This manual | https://signfiles.com/manuals/signature-server |
| Live test server (Source Edition, REST and CSC) | https://ca.signfiles.com/sign/ |
| SignLib, the signature library of the same family | https://www.signfiles.com/signature-library/ |
2. Requirements and planning
2.1 Requirements
| Item | Requirement |
|---|---|
| Operating system | Windows 10 or Windows Server 2016 or later, with Internet Information Services (IIS). |
| .NET | Microsoft .NET Framework 4.8, and the ASP.NET 4.8 feature enabled in IIS (Installation on IIS). Windows Server 2016 comes with .NET Framework 4.6.2: install 4.8 first. |
| Application pool | .NET CLR version v4.0 with the Integrated pipeline (the REST API needs it). The server runs in a 64-bit and in a 32-bit pool (it carries the SQLite engine for both). The bitness matters for a PKCS#11 driver: the driver must have the bitness of the pool (chapter 8). |
| Trust level | Full Trust. In partial trust (Medium Trust, on some shared web hostings) the signing keys and the PKCS#11 devices cannot be used. |
| Disk | A local disk for the application folder (not a network share): the database uses write-ahead logging (WAL), which does not work on network file systems. The account of the application pool must be able to write in the folder App_Data (Files and folders). |
| Clock | The signing time written in the signatures is the UTC time of the server: synchronize it with an (S)NTP time server. The Status page compares it with the time-stamp servers of the profiles (chapter 14). |
| Certificates | At least one signing certificate with its private key (chapter 7). For tests the server can create one (section 7.9). |
| Network | The client applications must reach the IIS site; use HTTPS. For levels B-T and above the server must reach the time-stamp servers of the profiles, and for B-LT, B-LTA and the verification the OCSP responders and CRL addresses of the certificates, directly or through a proxy (section 11.2). |
| Browser | A current web browser, for the administration pages. |
No database server is needed: the server keeps its data in one SQLite database file, App_Data\settings\rss.db, created at the first start.
2.2 Disk space and memory
The database holds the configuration, the certificates, the profiles, the clients, the audit trail and the transaction log. The transaction log grows by one row for each signing or verification request and keeps its rows 365 days by default (chapter 13); the documents themselves are never stored. Add room for the backups made on the server (App_Data\backups): a backup is a full copy of the database. The Status page warns when the free space on the disk of the data folder is under 1 GB or under twice the size of the database.
The documents are signed and verified in memory. A request can carry a document of up to the maximum document size (25 MB by default, at most 100 MB, section 11.1); plan the memory of the server for the number of such requests that can arrive at the same time.
2.3 Decisions before installing
- The address. At the root of a site (
https://sign.example.com/) or as an application of a site (https://www.example.com/sign/). The applications use this address; write it as the Public address of the server (section 11.1). - Where the keys are. A PFX file kept by the server, the Windows certificate store of the machine, or a PKCS#11 device (HSM, smart card, USB token). A device keeps the key out of the server's files; see chapter 7 and chapter 8.
- The account of the application pool. The account that must be allowed to use the keys and to write in
App_Data(section 3.3). - The time-stamp server. Levels B-T, B-LT and B-LTA need an RFC 3161 time-stamp server: PKISimple TSA Server on your own network, or the service of a trust service provider.
- Who may sign. One client per application, each with its own API key and only the profiles it needs (chapter 10).
- Behind a reverse proxy? Then write its address in Trusted reverse proxies, so that the IP allow-lists see the real address of the clients (section 10.5).
3. Installation on IIS
PKISimple Remote Signature Server is installed as an application of an IIS web site, or as a web site of its own. Use an account with Administrator rights for the steps below. The short version of these steps is in the file Installation.txt of the package.
3.1 Enable ASP.NET
On Windows 10 and Windows 11 open Control Panel → Programs and Features → Turn Windows features on or off. On Windows Server use Server Manager → Add Roles and Features and select the Web Server (IIS) role. Under Internet Information Services → World Wide Web Services → Application Development Features select ASP.NET 4.8. Windows selects the other components that it needs, such as .NET Extensibility 4.8.
3.2 Copy the files
The package (RemoteSignatureServer.zip) contains:
| Item | Content |
|---|---|
RemoteSignatureServer\ | The web application: the pages (*.aspx), Web.config, the folder bin and an empty folder App_Data. |
ApiSamples\ | The sample programs in nine languages, for the computers of the developers; not needed on the server (chapter 18). |
Installation.txt | The short installation instructions. |
Manual.txt | The address of this manual. |
License Agreement.txt, THIRD-PARTY-NOTICES.txt | The license terms. |
If Windows marks the downloaded zip file as blocked, right-click it, choose Properties and tick Unblock before you extract it; otherwise the database engine in bin\runtimes may not load.
Copy the content of the folder RemoteSignatureServer to a folder of the server, for example C:\inetpub\RemoteSignatureServer (next to the folder wwwroot of IIS, not in it), or a folder on a separate data disk. Do not put it under the folder of another web application.
- The folder must be on a local disk, not a network share: the database uses write-ahead logging, which does not work on network file systems.
- Copy the whole
binfolder, includingbin\runtimes\win-x64andbin\runtimes\win-x86: they hold the SQLite engine (e_sqlite3.dll). Without it the database cannot be opened.
The package contains no data, no key and no certificate: the database and the key of the installation (secret.key) are created at the first start (Files and folders).
3.3 Create the application pool
A dedicated pool keeps the account of the signing server separate from the other applications of the server, and it is the place where you decide which account runs the server, and so which account uses the keys.
- Open Internet Information Services (IIS) Manager and select Application Pools → Add Application Pool...
- Type a name, for example
SignPool. Select .NET CLR version v4.0 and the Integrated managed pipeline mode. - Keep the default identity, ApplicationPoolIdentity, unless a key must be used by a particular account. The account has the name
IIS AppPool\SignPool(the name of the pool, with the prefixIIS AppPool\). The identity can be changed later in Advanced Settings → Process Model → Identity. - In Advanced Settings set Start Mode to AlwaysRunning and, under Process Model, Idle Time-out (minutes) to 0: the server runs its daily tests and writes its alerts by itself, which a stopped pool cannot do.
Write down the identity of the pool. The rights on the folder, on the private keys of the Windows store and on the PKCS#11 devices are checked for that account (section 7.6).
The setting Enable 32-Bit Applications of the pool decides whether the server runs as a 64-bit or a 32-bit process. Both work. It matters only for a PKCS#11 driver, which must have the same bitness as the pool.
3.4 Add the application
In IIS Manager right-click the web site (for example Default Web Site) and select Add Application...
| Field | Value |
|---|---|
| Alias | sign (the alias becomes part of the address) |
| Application pool | SignPool (press Select... to choose it) |
| Physical path | C:\inetpub\RemoteSignatureServer (the folder that contains Default.aspx and Web.config) |
The address of the server is then http://localhost/sign/ on the server itself, or https://your-server/sign/ from the network; the REST API is at https://your-server/sign/api/v1/. The server also works at the root of a web site of its own (https://sign.example.com/): create the site with the same pool and folder.
Optional: to avoid a first answer of several seconds after a restart of the pool, install the IIS feature Application Initialization and set Preload Enabled to True in the Advanced Settings of the application (with the pool's Start Mode AlwaysRunning, section 3.3).
3.5 Give the application pool the rights it needs
The server writes only in its folder App_Data: the database, its backups and a few other files (Files and folders). The account of the application pool needs the Modify right on it. From a Command Prompt run as Administrator:
icacls "C:\inetpub\RemoteSignatureServer\App_Data" /grant "IIS AppPool\SignPool:(OI)(CI)M"Use the account of your pool. For a custom identity use DOMAIN\user or COMPUTER\user. The rights are inherited by the files and folders that the server creates later.
If the folder is not writable, the pages show a red message that begins with "The application cannot write to its data folder" followed by the path of the folder. Give the account of the pool the Modify right and reload the page. Remote visitors see only "The server has a configuration problem. The details are shown when this page is opened on the server itself (http://localhost/...), and in the Audit Trail."
3.6 IIS authentication and HTTPS
In IIS Manager select the application, then Authentication:
- Anonymous Authentication must be Enabled. The client applications (by their API keys) and the administrator are checked by the server itself, not by IIS.
- Basic Authentication and Windows Authentication must be Disabled. If IIS asks for a Windows account, the applications cannot send the API key and the CSC login that the server expects.
Use HTTPS. Add an HTTPS binding to the web site with a server (TLS) certificate. The API keys, the CSC PINs and the documents travel in the requests; over plain HTTP they are readable on the network, and so are the administrator password and the login cookie. The login page then warns "This connection is not encrypted (HTTP): the password is sent in clear text. Use HTTPS when the server can be reached from other networks." The CSC API refuses plain HTTP. See Security recommendations.
3.7 First start
Open the address of the application in a browser on the server itself, for example http://localhost/sign/.
- License agreement. The first page shows the license agreement. Scroll to its end, tick I have read the license agreement and I accept its terms and press Accept and Continue (the box can be ticked only after the agreement was scrolled to its end). Until the agreement is accepted and the administrator account is created, the server refuses every signing request with "The server is not installed yet: its administrator must open the administration pages, accept the license agreement and create the administrator account."
- Administrator account. The page Create an administrator account asks for a Username and a Password; press Create Account. Until the account exists, anyone who opens the page can create it: do it yourself, right away, before you give the address to anybody (License agreement and administrator account).
- The main page opens. It says that there is no signing certificate yet. Continue with the Quick start: a certificate, a profile, a client.

Until the administrator account exists, the first person who opens the pages creates it, from any computer. Complete the first start yourself, right after copying the files, before you give the address to anybody.
If you get an error page instead of the first page, check:
- that the ASP.NET 4.8 feature is installed (03.1);
- that the application pool uses .NET CLR version v4.0 and the Integrated pipeline;
- that the physical path of the application is the folder that contains
Default.aspxandWeb.config; - that the folder
bin\runtimeswas copied: if the database cannot be opened, the pages say "The database cannot be opened: …" and the details are written toApp_Data\settings\startup-error.txt(Problems and solutions).
Before you sign for real, make sure that the clock of the machine is synchronized with an (S)NTP time server (on Windows: the Windows Time service). The signing time written in the signatures is the time of the machine; the time stamps of levels B-T and above come from the time-stamp server.
Source Edition: there is no license agreement and no administrator account. The administration pages have no login: everybody who can open them can change the certificates, the profiles and the clients, and can read the logs. Install the Source Edition only where you trust everybody who can reach it, and do not publish it on the internet.
3.8 Shared web hosting
The server can also run at a hosting provider that offers ASP.NET 4.8 on IIS. Web.config is written for that: it has no sections that hosting providers usually lock (no <handlers> or <modules>), and the data files are in App_Data, which IIS and ASP.NET never serve. Check with the provider that:
- the site runs in Full Trust. In partial trust the pages show "The application runs in partial trust (Medium Trust): the signing keys and the PKCS#11 devices cannot be used. Ask the hosting provider to run the site in Full Trust.";
- the account of the site can write in the folder
App_Data; - the files are on a local disk of the web server, not on a network share.
Upload the content of the folder RemoteSignatureServer with the whole bin folder, then open the site and continue as in 03.7. If something fails at the start, App_Data\settings\startup-error.txt (readable with the file manager or FTP of the provider) holds the reason.
PKCS#11 devices and the Windows certificate store of the machine are usually not available at a hosting provider: use a PFX file.
3.9 Updating an installation
To install a newer build over an installation that works: make a backup first (Backup, restore, move and upgrade), stop the application pool, copy the new files over the old ones and start the pool again. Never delete or replace the folder App_Data: it holds the data of the server, including the file secret.key, without which its PFX files and passwords cannot be read.
When you upload the new files with FTP, do not use a "mirror" or "synchronize" mode that deletes on the server the files that are not on your computer: it would delete App_Data and the data of the server.
4. The main page and the navigation
4.1 The menu bar and the bottom bar
Every administration page has the same dark bar at the top: Main, Signing Certificates, Profiles, Clients, Configuration, Transactions, Audit Trail, Status, Backup, Tools and, on the right, Log out. The current page is underlined. On a phone the links move to a second row.
Every page ends with the same bar: on the left the way back (← Main Page, or ← Signing Certificates on the page of one certificate), on the right the actions of the page, the main one in blue. Buttons inside a section (Load Certificate, Test the Key, Check…) are small and stay under their fields.
A change is saved only when you click its Save button. If you leave a page with changes that are not saved, the browser asks first.
4.2 The main page
- Status warning: a red or yellow message, only when something needs attention, with a link to the Status page (chapter 14).
- Signing certificates warning: red when a signing certificate cannot sign or expires in less than 7 days, yellow when one expires in less than 30 days, blue while there is no signing certificate yet; with a link to the Signing Certificates page (section 7.11).
- Trusted certificates warning: yellow when a trust anchor of the verification expires in less than 30 days or has expired; grey only while nothing is trusted at all (no enabled trust anchor in the list, and both "Trust the Windows trusted root certification authorities" and "Trust the qualified trust services of the EU trusted lists" turned off in Configuration). An empty list alone shows nothing: the Windows store and the EU trusted lists are trust anchors too. With a link to the Trusted Certificates page (section 11.6). Nothing while the verification is off.
- License Status: "Licensed to customer" on a registered server, otherwise the trial with the days and signatures left and the Register Now button (chapter 19).
- Status Info: the version, the address of the server, the addresses of the REST API, of the API documentation and of the CSC API ("turned off", with a link to the Configuration page, when one is off), the number of signatures created, the number of verifications (the reports of
verifyandverify/certificategiven to the clients; the Verify Signatures page and the verification test are not counted) and the number of rejected requests. - Server Settings: links to the pages of the menu bar, in its order (Signing Certificates … Backup and Restore).
- Tools: Verify Signatures, Sign a Test Document and Trusted Certificates.

5. Quick start
From a new installation to a first signed PDF, in five steps. The steps use a certificate made by the server for tests; for real signatures add the certificate of your organization instead (chapter 7). The examples use the address https://sign.example.com/sign/: write the address of your server.
A new installation already has a test certificate and the five default profiles pades, cades, xades, asice and hash (chapter 9): with them you can go straight to step 3. Steps 1 and 2 show how to add your own.
5.1 A signing certificate
- Menu Signing Certificates → Create a Certificate for Tests.
- Type a Common Name, for example
Example Seal (test), and a PFX password of at least 10 characters. - Keep Add as a signing certificate ticked and click Create Certificate.
The certificate appears on the Signing Certificates page as Usable, labelled "(test certificate)" (section 7.9).
5.2 A profile
- Menu Profiles → Add a Profile.
- Type PAdES, Name
invoices, Signing certificate the certificate of step 1, Level B-B (a level with a time stamp needs the address of a time-stamp server). - Click Add the Profile.
5.3 Try the profile
Menu Tools → Sign a Test Document: choose the profile invoices, select a PDF file and click Sign. A green line says that the document was signed and that the signature was verified; Download saves the signed PDF. Open it in a PDF reader: the signature panel shows the signature, with a warning that the test certificate is not trusted (section 15.1).
5.4 A client
- Menu Clients → Add a Client.
- Name
erp, tick the profileinvoicesunder Allowed profiles, and click Add the Client. - Click Generate a Key and copy the key: it is shown only once (section 10.3).
5.5 Sign through the REST API
With PowerShell 7 or Windows PowerShell 5.1, on any computer that reaches the server:
$server = "https://sign.example.com/sign/"
$key = "<the API key of step 4>"
Invoke-RestMethod "$($server)api/v1/health"
$pdf = [Convert]::ToBase64String([IO.File]::ReadAllBytes("C:\Temp\invoice.pdf"))
$body = @{ profile = "invoices"; document = $pdf; fileName = "invoice.pdf" } | ConvertTo-Json
$answer = Invoke-RestMethod "$($server)api/v1/sign/pades" -Method Post -ContentType "application/json" `
-Headers @{ Authorization = "Bearer $key" } -Body $body
[IO.File]::WriteAllBytes("C:\Temp\invoice-signed.pdf", [Convert]::FromBase64String($answer.content))The first call answers healthy; the last one writes the signed PDF. The signature is a line of the Transactions page (chapter 13), counted for the client and for the trial.
Next:
- the interactive documentation of the API at
https://sign.example.com/sign/swagger(section 16.13); - the sample programs in nine languages (chapter 18);
- HTTPS, a strong administrator password and the other security recommendations;
- a first backup (chapter 20).
6. License agreement and the administrator account
The license agreement. A new installation first shows the license agreement. The box "I have read the license agreement and I accept its terms" can be ticked only after you scrolled the agreement to its end. Until the agreement is accepted and the administrator account is created, the server signs nothing.
The first start. After the agreement, the login page asks you to create the administrator account: a user name and a password. Until it exists, anyone who opens the page can create it.

Create the account yourself, right after the installation, before you give the address to anybody.
Log in. Enter the user name and the password and click Log in. After several wrong passwords the page makes you wait before the next attempt. Log out on the right of the bar ends the session.

Forgotten password.
- On the server, create an empty file
reset-admin.txtinApp_Data\settings. - Open the login page: the server writes a one-time code into the file.
- Enter the code, a new user name and a new password on the login page.
The previous account and every login session end, and the file is deleted. The code is valid for one hour and is replaced after five wrong attempts. To cancel a reset, delete the file and reload the login page.
the login page warns when the connection is not encrypted. Use HTTPS when the administration pages can be reached from other networks.
# 07. Signing certificates
A signing certificate is a certificate with its private key that the server signs with. Each profile signs with one certificate; one certificate can serve several profiles. Add as many as you need: for example one company seal for invoices and another for contracts.
A new installation already has one, "Test Signature Certificate (test certificate)", made for its default profiles (chapter 9). In the Source Edition this certificate cannot be changed or deleted (the page says so and refuses Save Changes); you can still add other certificates for your own profiles.
The key stays where it is:
| Source | Where the key is | Chapter |
|---|---|---|
| PFX or P12 file | the file is uploaded once and kept by the server, encrypted, with its password | 7.3 |
| Windows certificate store | the personal store of the machine (Local Machine) or of the account of the server (Current User) | 7.4 |
| PKCS#11 device | an HSM, a smart card or a USB token; the server logs in with its PIN | 8 |
The server keeps the certificate chain (the issuers up to the root) with each certificate and puts it in the signatures, so that the people who check a signature can follow it to a certification authority they trust.
7.1 Certificate requirements
| Requirement | Why |
|---|---|
| An RSA or ECDSA key | the signature formats of the server sign with these keys |
| Inside its validity period | a signature made with an expired certificate is not valid |
| Key Usage Digital Signature or Non Repudiation, when the certificate has a Key Usage | a certificate made for encryption only cannot sign documents |
| A private key that the account of the server can use | tested when you choose the certificate (7.5) |
The page also warns, without refusing the certificate, when:
- the certificate expires within 30 days;
- it is self-signed: the people who check the signatures trust them only if they trust this certificate itself;
- its RSA key is shorter than 2048 bits;
- it is a CA certificate: documents are normally signed with an end-entity certificate.
For signatures that are recognised in the European Union, use a certificate for electronic seals issued by a trust service provider, kept on a device that the provider allows.
7.2 The Signing Certificates page
Menu Signing Certificates. The table shows every certificate with:
- Name: the name you gave it; the profiles choose their certificate by this name;
- Subject and Issuer: the common names (point at them to see the full names);
- Valid (UTC): the first and the last day of validity;
- Key: for example RSA 2048 or ECDSA P-256;
- Source: PFX file, Windows store (Local Machine or Current User), PKCS#11 device;
- State: Usable (green), usable with a warning (yellow), or the problem that stops it from signing (red), with the reason;
- Profiles: the profiles that sign with it.

The buttons of a row: Edit opens the certificate, Test the Key signs a test message with it (7.5), Delete deletes it (7.8). Add a Signing Certificate at the bottom opens the page of a new certificate.
7.3 Add a certificate from a PFX or P12 file
- On the Signing Certificates page click Add a Signing Certificate.
- Type a Name, or leave it empty to use the common name of the certificate.
- Keep Certificate from a .PFX or .P12 file selected.
- Press Choose File, select the file, type its password and click Load Certificate.
- The certificate appears as Selected certificate, with its chain. The server signs a test message with its key at once and says whether the certificate can sign.
- Click Add the Signing Certificate.
The file must contain the private key. A file that is loaded but never saved is deleted from the server after an hour.
keep your own copy of the PFX file and its password in a safe place. The server's backups contain the file (chapter 20), but a copy of your own lets you install the certificate on another server.
7.4 Add a certificate from the Windows certificate store
Use this source when the certificate is already installed on the server, for example by your IT department or by the software of a token.
- Click Add a Signing Certificate and type a Name (or leave it empty).
- Select Certificate from the Windows certificate store.
- Choose the Certificate store: Local Machine (recommended) or Current User (the personal store of the account that runs the server).
- Choose the certificate in Certificates on store. Each entry shows its expiry date; the ones that cannot sign are marked "cannot sign", those installed without a private key "no private key".
- The server tests the key at once (7.5). Click Add the Signing Certificate.
The server signs with the key in the store: if the certificate is removed from the store, or renewed with a new thumbprint, choose it again (7.8).
7.5 Test the Key
Test the Key signs a short test message with the private key, as a signature request will, and checks the signature with the certificate. Nothing is saved and the test does not count as a signature.
- On the page of a certificate it tests the certificate you loaded or chose; when you loaded nothing, it tests the current certificate.
- On the Signing Certificates page it loads the key again and tests it, for example after a token or an HSM was reconnected or after you gave the account of the server the right to use a key.
A failed test says why (7.7). The certificate cannot be saved until the test passes.
7.6 The private key and the application pool
The server runs under the identity of its IIS application pool, for example IIS AppPool\SignPool. That account, not your own, must be able to use the private key:
- PFX file: nothing to do; the server loads the key itself.
- Windows store, Local Machine: give the account read access to the key: open certlm.msc, find the certificate under Personal, then All Tasks → Manage Private Keys, add the account and allow Read.
- Windows store, Current User: the store of the account of the pool, not yours. Install the certificate while logged in as that account, or prefer Local Machine.
7.7 Key errors and solutions
The messages explain the error first and then give the original text and code of Windows, so that you can search for them.
| Message (beginning) | What to do |
|---|---|
| The private key of the certificate was not found | The certificate is installed without its key. Install it again together with the key (from the PFX file). |
| The server cannot open the private key of the certificate ("Keyset does not exist", "Invalid provider type specified") | The account of the server has no right to read the key, or the key was installed for another account. Give the account read access (7.6). |
| The account that runs the server (…) is not allowed to use the private key | Give the account named in the message read access to the key (7.6). |
| The private key needs a person to answer (a PIN or a confirmation window) | A service cannot answer a prompt. Use a key without confirmation, or a PKCS#11 device (8). |
| The certificate (thumbprint …) was not found in the Windows certificate store | The certificate was removed or renewed. Install it again, or choose the new certificate (7.8). |
| The PFX file cannot be opened: the password is wrong or the file is not a PFX / P12 file | Check the password and the file. |
| The selected certificate cannot sign: … | The certificate does not meet a requirement of section 7.1; the message names it. |
7.8 Change or delete a certificate
Change. Click the name or Edit. The Current certificate stays at the top. You can:
- change the Name and click Save Changes;
- load another PFX file or choose another certificate of the store (a renewed certificate), then Save Changes. The next signatures use the new certificate; the profiles keep pointing to it.

If somebody else changed the certificate while you had the page open, the server does not overwrite that change: open the page again and repeat yours.
Delete. Click Delete on the Signing Certificates page and confirm. A certificate that a profile uses cannot be deleted: choose another certificate in those profiles first. A certificate of the Windows store or of a device stays there; the encrypted PFX file of a deleted certificate is removed from the server within an hour.
Every addition, change and deletion is written to the Audit Trail (chapter 12), without any password or PIN.
7.9 Create a certificate for tests
For tests and demos the server can create a self-signed signing certificate with its private key. The validators trust its signatures only if they trust this certificate itself: for real signatures use a certificate issued by a certification authority.

- On the Signing Certificates page click Create a Certificate for Tests.
- Enter the Common Name (required) and, if you want, the organization, the unit, the e-mail address and the two-letter country code.
- Choose the Validity period (at most 10 years), the Key algorithm (RSA 2048, 3072 or 4096 bits, or an elliptic curve P-256, P-384 or P-521) and the Certificate signature hash.
- Enter the PFX password: at least 10 characters, 16 or more random characters recommended.
- Keep Add as a signing certificate ticked to save it at once as a signing certificate of the PFX source; its name (the Name of the signing certificate, or the Common Name) gets the label "(test certificate)". Untick it to create only the PFX file.
- Click Create Certificate, then Download the PFX File if you want a copy: a file that no signing certificate uses is deleted from the server within an hour.
The certificate has the Key Usage Digital Signature and Non Repudiation (critical). The page warns when an RSA key below 3000 bits does not meet ETSI TS 119 312 for the chosen dates. The PFX file is protected with 3DES, which every supported version of Windows (Windows Server 2016 included) opens. An edition of the server built without the SignLib license serial creates certificates valid for 30 days at most; the page says so.
7.10 Complete the chain
The signatures embed the chain of the signing certificate: the certificate and its issuers up to the root. The server builds it from the PFX file and from the certificates Windows knows. When an issuer is missing (a PFX file exported without the chain, a .cer file of a device), the edit page shows "the issuer of the last certificate was not found".
To complete it, open the certificate (the box Complete the chain is shown only while the chain does not end with a root), choose the issuer certificates under Complete the chain (.cer, .crt, .pem or .p7b; several files, or a file with several certificates) and click Add to the Chain. The server keeps only the certificates that are issuers of this chain (same name and a valid signature) and saves the chain at once; the next signatures embed it. Choosing the certificate again builds the chain again from its source.
7.11 Expiry warnings
| When | Main page | Status page, line "Signing certificates" |
|---|---|---|
| Less than 30 days before the end of validity | yellow warning | warning |
| Less than 7 days before the end of validity | red warning | error |
| Expired, not valid yet, or the key cannot be loaded | red warning | error |
The Signing Certificates page shows the same state for each certificate. Renew the certificate (or choose or create another one) and save it before that date: the profiles keep pointing to the signing certificate. The server also writes an alert to the Audit Trail at 30 days, at 7 days and when the certificate has expired (chapter 14).
7.12 Check the revocation before signing
Check the revocation before each signature (on the page of a signing certificate, off by default): before every signature the server asks the OCSP responder of the certificate (or downloads its CRL), and the same for its CA certificates, through the chain shown on the page. The answers are kept for the lifetime of the revocation cache (1 hour by default). A revoked certificate signs nothing (CERTIFICATE_NOT_VALID); when the status cannot be obtained, the request is refused too (REVOCATION_DATA_UNAVAILABLE, try again later). It adds the time of one OCSP request to the first signature after the cache expires. B-LT and B-LTA signatures fetch this data anyway.
Outgoing calls. The server calls the TSA of the profiles and the OCSP responders and CRL addresses of the certificates. The configuration has a proxy for these calls (with a user and a password, stored encrypted), a timeout (10 seconds), the lifetime of the revocation cache (1 hour) and Block private addresses (on): an OCSP or CRL address of a certificate that points to the server itself or to a private network is never contacted, against requests forged through certificates. Turn it off only for a CA of your own network. These settings are in the Network section of the Configuration page (section 11.2).
8. HSM, smart cards and USB tokens (PKCS#11)
With a PKCS#11 device the private key never leaves the device: the server sends it what to sign and receives the signature. The server talks to the device through the PKCS#11 driver (a .dll) of its vendor and logs in with the user PIN.
8.1 Before you start
- Install the driver of the device on the server, in the version that matches the process (the page shows "Processor architecture": a 64-bit process needs the 64-bit driver).
- Have the public certificate of the key as a
.cerfile (DER or PEM). - Know the slot number of the token (0 for the first token of the driver) and the user PIN.
8.2 Add the certificate of a device
- Click Add a Signing Certificate and type a Name (or leave it empty).
- Select Key on an HSM, smart card or USB token (PKCS#11 driver).
- Enter the PKCS#11 driver path, for example
C:\Program Files\SafeNet\LunaClient\cryptoki.dll: a full path on a local disk. - Enter the Slot number, the Device User PIN and the number of Parallel sessions: 1 for smart cards and USB tokens, 4 or more for network HSMs (at most 32). This is the number of signatures the device makes at the same time. It is the throughput setting of the device: when many clients sign at the same time through one network HSM, the signatures wait for a free session, so raise it as far as the device and its license allow.
- Choose the Public certificate (.CER) and click Test the Key. The server logs in to the device, signs a test message with the key of the certificate and checks the signature.
- When the test passes, click Add the Signing Certificate.
Change the PIN or the sessions. Open the certificate, type the new PIN or number of sessions, leave the .CER empty, click Test the Key, then Save Changes. An empty PIN box keeps the saved PIN of the same driver and slot.
8.3 Tips and messages
- A wrong PIN is not sent again by the signatures: most devices lock the PIN after a few wrong attempts. Correct the PIN on the page and click Test the Key; the test sends it again.
- After the device was disconnected or restarted, click Test the Key on the Signing Certificates page: the server opens new sessions.
- The account of the application pool must be allowed to use the driver and, for some devices, its configuration files: see the guide of the device vendor.
| Message (beginning) | What to do |
|---|---|
| The driver file does not exist | Check the path and the processor architecture of the driver. |
| … PIN … | The device refused the PIN: correct it and test again before the device locks it. |
| The rejected PIN is not sent again | A signature met a PIN that the device refused: correct the PIN, then Test the Key. |
| The test signature … does not match the public key of the selected certificate | The .CER file is not the certificate of the key on that slot: choose the right file or slot. |
# 09. Profiles
A profile is what a client asks for by its name: the type of signature, the signing certificate and every setting of the signature. The client sends the document (or, for a Hash profile, the digest) and only the fields that the profile marks Overridable; a request that sets any other field is refused.
The default profiles. At its first start (in the licensed edition: once the license agreement is accepted) a new installation creates a self-signed test signing certificate, "Test Signature Certificate (test certificate)" (subject CN=Test Signature Certificate, OU=MyUnit, O=MyOrganization, C=US) (a new RSA 2048 key of its own, valid 10 years), and five Active profiles that use it: pades, cades, xades, asice and hash, each of the type of its name, with the default settings. The document profiles are at level B-B in the licensed edition and at level B-T, with the time-stamp server https://ca.signfiles.com/TSAServer.aspx, in the Source Edition. In the licensed edition they are ordinary profiles: choose the certificate of your organization, change, rename or delete them. In the Source Edition they cannot be deleted, renamed or deactivated and keep the certificate created at installation (the Profiles page shows no Delete for them; on their page the name, Active and the certificate are read-only, with the reason); their other settings can be changed, and other profiles can be added freely. This happens once: a deleted default profile never comes back, and an installation that already has a certificate, a profile or a client, or that was restored from a backup, gets nothing. The Audit Trail records it ("Initial setup: …"); if it fails, the server tries again every minute.
The Profiles page (menu Profiles) lists the name and description, the type, the signing certificate, the main settings, the state (active, not active, or a certificate that cannot sign now) and the number of clients allowed to use the profile. Edit opens it; Delete removes it together with the permissions of its clients.

Add a profile. Click Add a Profile, choose the Type (it cannot be changed later), then:

| Field | What it does |
|---|---|
| Name | Letters A-Z, digits, - and _, unique (upper and lower case are the same name). The clients send it: profile in the REST API, credentialID in the CSC API. |
| Description | Shown to the clients (at most 256 characters). |
| Active | Not active: every request for the profile is refused, as if it did not exist. The Sign a Test Document page can still sign with it. |
| Signing certificate | The certificate the profile signs with (chapter 7). A certificate used by a profile cannot be deleted. |
| Hash algorithm | SHA-256, SHA-384 or SHA-512. SHA-1 is not offered (ETSI TS 119 312). |
| Minimum remaining days | Requests are refused when the certificate has fewer days of validity left (0 = until it expires). |
| CSC signatures per authorization | How many hashes one CSC authorization may sign (1–100). |
Hash profiles sign the digest a client sends: the accepted digest algorithms, the RSA padding (PKCS#1 v1.5 or PSS) and the ECDSA encoding (DER or raw r‖s, overridable). The page says it plainly: the server signs any digest an authorized client sends, without seeing the document. Allow a Hash profile only to clients you trust with the key.
PAdES, CAdES, XAdES and ASiC-E profiles have a Level: B-B (basic), B-T (with a time stamp), B-LT (with the validation data) or B-LTA (with an archive time stamp). From B-T the profile needs a TSA URL; a fallback URL, a user and password (stored encrypted; leave the box empty to keep the saved one), a policy OID and the hash of the time stamp request are optional. For B-LT and B-LTA the signature fails when the revocation data cannot be fetched, unless Allow level T is ticked (the transaction then says so). Certificates included: the chain without the root (the default), the signing certificate only, or the whole chain with the root.
- PAdES: the kind of signature (approval, or a certification that allows no changes, form filling, or form filling and annotations; "no changes" cannot be combined with B-LT or B-LTA, because the validation data added later is a change), reason, location, contact (written in the signature, overridable), and a maximum document size. The signature is always invisible: it is shown in the signature panel of a PDF reader, not on a page.
- CAdES: attached (
.p7m) or detached (.p7s), content type (OID), MIME type, commitment type. - XAdES: enveloped or detached, commitment type, signature production place (city, state, postal code, country).
- ASiC-E: the maximum number of files (1–1000) and the maximum total size; the signatures are XAdES.
The server checks every profile before it saves it and refuses one that could not sign, with the reasons. Every addition, change and deletion is written to the Audit Trail with the old and new values, never with a password. A change applies to the next request at once.
Sign a Test Document tries a profile before the clients use it, also a profile that is not Active yet (section 15.1).
# 10. Clients and API keys
A client is an application that signs through the server: an ERP, a document management system, a script. Each one has its own API key, so you can see who signed what, limit each one and stop one without touching the others.
10.1 The Clients page
Clients in the menu lists every client: its state (green when it can work, amber when it is enabled but has no API key yet or may do nothing (no profile and no verification), grey when it is disabled), its Operations (Sign when it has an allowed profile, Verify when it may verify signatures), the key id of its API key with the time it was generated, the profiles it may use, the signatures of today and of this month (with the quota, when there is one), its IP allow-list and when and from which address it last authenticated. Add a Client opens an empty client; the name or Edit opens one; Delete removes it and its API key stops working at once.

Source Edition. The Source Edition starts with the client api-samples, made for the API samples (chapter 18): all default profiles, May verify, CSC access, no quota and no address list, with a fixed API key and a fixed CSC PIN that are public (they are in the samples and on the Configuration page). It cannot be deleted, renamed or disabled, its CSC access cannot be turned off and its key and PIN cannot be replaced or removed (its page shows them; the buttons answer with the reason); its other settings can be changed. Add other clients, with keys of their own, for your applications: they work as in the licensed edition.
10.2 Add or change a client
| Field | What it does |
|---|---|
| Name | Letters, digits, _, . and -, at most 64 characters, unique (in any case). It names the client in the logs. |
| Enabled | Off: every request of the client is refused (its key and settings stay). |
| Allowed profiles | The profiles the client may use. None by default: for any other profile the client gets "profile not found", as if it did not exist. |
| Signatures per day / per month | Quotas in UTC days and months (0 to 1,000,000,000; empty = unlimited). The day quota cannot be higher than the month quota. |
| IP allow-list | IP addresses and ranges, IPv4 or IPv6 (192.168.10.0/24, 2001:db8::/32), separated by commas or new lines. Empty: any address. The page shows your own address as the server sees it. |
| Allowed operations | Sign: with the allowed profiles above (no profile: the client cannot sign). Verify: may verify signatures: the client may call the verification endpoints (verify, section 16.12). Off by default; it needs no profile. |
| Verifications per day / per month | Quotas of verifications (verify and verify/certificate; verify/policy is free), counted apart from the signatures, in UTC days and months (0 to 1,000,000,000; empty = unlimited). The page shows the verifications of today and of this month. |
| CSC access | The client may log in to the CSC API with its name and its CSC PIN (chapter 17). Off by default. |
| CSC PIN | Generate a PIN makes 16 random letters and digits, shown only once; or type a PIN of 6 to 32 printable characters without spaces and click Set this PIN; Remove the PIN. The server keeps only a fingerprint of it. A new or removed PIN ends the CSC sessions of the client at once. |
Add the Client saves it and keeps the page open, so that you can generate its key. The server checks every value before it saves and refuses a wrong one with the reason. Every addition, change and deletion is written to the Audit Trail with the old and new values. A change applies to the next request.

10.3 The API key
The key is made by the server: 32 random bytes written as 43 letters, digits, - and _. Click Generate a Key on the page of the client. The key appears once, in a green box with a Copy button: copy it and give it to the application, which sends it with every request:
Authorization: Bearer <the API key>The server does not keep the key. It keeps only a fingerprint of it (an HMAC computed with the secret of the installation) and the first 8 characters of that fingerprint, the key id, which names the key on the pages and in the logs. Neither the key nor its fingerprint can be turned back into the key, so a lost key cannot be shown again: generate a new one.
- Generate a New Key replaces the key: the old key stops working at once.
- Revoke the Key deletes it: the client is refused until a new key is generated.
Both are written to the Audit Trail with the key ids, never with a key.
Backups. A backup holds the fingerprints, not the keys. The keys keep working after a restore only with the secret.key of the same installation; the check of a backup file says so (line "Client API keys").
10.4 Quotas
A signature is counted against the day and the month of the client before it is made and given back when it fails, so a refused or failed request costs nothing. A request over a quota is refused. Inside one worker process the quotas are exact; with several worker processes (a web garden) they can be exceeded by the signatures of about one second, and if the application pool stops abruptly the signatures of the last second are not counted. The counts of a day are kept 62 days, those of a month 25 months.
Verifications have quotas of their own (Verifications per day / per month), counted the same way and never against the signatures: one per verify or verify/certificate request, given back when the request is refused after the quota check (an unsupported document, a busy server, a timeout), so only a report costs one. Over a quota the client gets 429 QUOTA_EXCEEDED with Retry-After (the next UTC day or month).
10.5 Addresses, proxies and wrong keys
The IP allow-list is checked against the address that connected to the server. When the server is behind a reverse proxy or a load balancer, that address is the proxy's; the server then reads the client address from the X-Forwarded-For header, but only from the trusted reverse proxies of the server settings (section 11.1), so that nobody else can choose the address that is checked.
After 5 wrong API keys from one address, the requests with a key from that address are refused for 1 minute, then 2, 4, 8 and at most 15 minutes for each further wrong key. A key that has already worked keeps working, so a client is not stopped by wrong keys that somebody else sends from the same address. Each block is written once to the Audit Trail ("Client authentication failures"). The wrong keys themselves are never written anywhere.
# 11. Server settings
Configuration in the menu opens the settings of the server. A change is used by the next request, without a restart, and every changed value is written to the Audit Trail with its old and new value. Save Configuration saves the whole page. The links at the top of the page jump to its five sections: General, Network, REST API, CSC API and Signature Verification. Each section says who uses it: General, Network and REST API are used by signing and verification, CSC API by signing only, Signature Verification by verification only. Restore Defaults in the title of a section fills that section with its default values (after a confirmation); they are saved only when you click Save Configuration. A value marked as risky below is saved with a warning. The retention of the transaction log is set on the Transactions page (chapter 13), the time of the daily tests on the Status page (chapter 14).

11.1 General
| Setting | Default | What it does |
|---|---|---|
| Public address | empty | The address the clients use, for example https://sign.example.com/sign/ (the server adds the final /). Shown on the main page, in the API documentation and in the CSC info. Empty: the address of each request (the page shows it). |
| Maximum document size (MB) | 25 | 1–100. A larger document is refused with DOCUMENT_TOO_LARGE; a profile can only lower it. The page shows the largest request the server reads (the document in Base64 and the JSON around it, 36 MB for 25 MB). The verification accepts 5 MB more (a signed copy is larger than the document; 16.4). |
| Document signatures at the same time | the number of processors | 1–64. PAdES, CAdES, XAdES and ASiC-E requests (and CSC signDoc) above this number wait at most 5 seconds, then get 503 SERVER_BUSY with Retry-After; a waiting request is read only when its turn comes, so the limit also bounds the memory the server uses for large documents. Hash signatures, the daily tests and the test page are not counted. Raise it on a server with much memory and many processors; lower it when large documents make the server slow. |
| Trusted reverse proxies | empty | Addresses and ranges (IPv4 or IPv6, 10.0.0.0/24), separated by commas or new lines. Only a request from one of them may give the address of the client in X-Forwarded-For (IP allow-lists, wrong-key blocks, logs). Empty: the header is ignored. |
11.2 Network (outgoing calls)
The calls of the server to the time stamp authorities and to the OCSP responders, CRLs and issuer certificates named in the certificates, for signing and for verification.
| Setting | Default | What it does |
|---|---|---|
| HTTP proxy, proxy user, proxy password | empty | For example http://proxy.example.com:8080/. Empty: the proxy of the system. The password is stored encrypted and never shown: leave its box empty to keep it; it is removed when the user is emptied. |
| Network timeout (seconds) | 10 | 2–60, for each outgoing call. |
| Revocation cache (hours) | 1 | 0–24; 0: not kept. Never beyond the next update of the CRL or OCSP response. |
| Block private addresses in the URLs of the certificates | on | An OCSP, CRL or issuer address inside a certificate that points to this computer or to the local network is not called (requests forged through certificates). Risky when off; turn it off only for a CA of your own network. |
11.3 REST API
The section shows the address of the API (<server address>/api/v1/). In the Source Edition the REST API, the CSC API (11.4) and the verification API (11.5) are always on: saving the page with one of them off is refused, because the API samples use them. The Source Edition also shows here Download the API Samples, with the public API key and CSC PIN of the client api-samples and the address to give the samples.
| Setting | Default | What it does |
|---|---|---|
| REST API enabled | on | Off: every call under api/v1 except health is refused with 403 API_DISABLED, whatever the key. The CSC API has its own switch. |
| API documentation (Swagger) enabled | on | The interactive documentation at <server address>/swagger and its description swagger/docs/v1. Off: both answer 404. |
Wrong API keys are blocked by address (fixed): after 5 failures 429, first for a minute, the block doubling up to 15 minutes; each block is written once to the Audit Trail. The Source Edition also has Download the API Samples here: the samples of chapter 18, to run with the address of the site and the key of a client.
11.4 CSC API
The section shows the address of the CSC API (<server address>/csc/v2/); chapter 17 describes it.
| Setting | Default | What it does |
|---|---|---|
| CSC API enabled | off | Off: csc/v2 answers 404. On (risky): a client with CSC access signs with its name and CSC PIN only (sole control level 1, no second factor). |
| Access token lifetime (minutes) | 15 | 1–60: the expires_in of auth/login. |
| SAD lifetime (minutes) | 5 | 1–60: the expiresIn of credentials/authorize. |
| Region | RO | Two letters (ISO 3166-1): the region of info. |
| Ask the PIN again at credentials/authorize | off | For signing applications that always prompt for a PIN: credentials/info then lists one PIN object. |
| signDoc enabled | on | The server signs whole documents with the profile. Off: signDoc is not in info and answers 501; signHash still works. |
Wrong PINs are blocked per address and per client (fixed): after 5 failures auth/login answers 429, first for a minute, the block doubling up to 15 minutes.
11.5 Signature verification settings
The section is used by verification only. Its settings are in groups: Trust, Revocation, Algorithms, Limits, Privacy and Tools.
| Setting | Default | What it does |
|---|---|---|
| Verification API enabled | on | The clients that may verify (section 10.2) can call verify, verify/policy and verify/certificate. Off: every client gets 403 OPERATION_NOT_ALLOWED; the Verify Signatures page still works. |
| Trust the Windows trusted root certification authorities | on | Also trusts the root store of this computer. Two servers with different root stores may then report the same signature differently. Off: only the Trusted Certificates list (and the EU trusted lists, below) is trusted. Trust is information in the report: it never makes a signature valid or invalid. |
| Trust the qualified trust services of the EU trusted lists (eIDAS) | on | Looks up the certificates in the EU trusted lists (section 11.7): the report shows the eIDAS qualification (the eIDAS mark), and the CA of a qualified certificate and a qualified time-stamping unit named by the EU trusted list of their country are trusted without being in the Trusted Certificates list. Off: nothing is downloaded and no eIDAS mark is shown. |
| Use a downloaded list for (days) | 7 | 1–30. After that, a list is asked for again, only when a verified document needs it. |
| Revocation checking | OCSP, then CRL | Or OCSP only, CRL only, None. A certificate revoked before the signature time makes the signature invalid. With None every signature gets the warning that the revocation was not checked (risky). |
| Fetch revocation data online | on | Off: only the validation data inside the signature (B-LT, B-LTA) is used. |
| Check the revocation of the CA certificates | on | The intermediate authorities of the chain are checked too (risky when off). |
| Minimum RSA / DSA key size; minimum EC key size | 2048; 256 | 1024–4096 and 160–521 bits. A smaller key gets the warning MSG-WEAK-ALGORITHM; it does not change the result. Lower values are risky. |
| Accept SHA-1 with a milder warning | off | Off: SHA-1 gets MSG-WEAK-ALGORITHM, as MD5 always does. On: MSG-WEAK-ALGORITHM-ALLOWED (risky; for old archives). |
| Original files per request | 10 | 1–100. |
| Signatures per document | 100 | 1–1000. A document with more signatures: the first ones are reported and the result is at best "not verifiable". |
| Verifications at the same time | the number of processors | 1–64. As many more requests wait at most 5 seconds, then 503 SERVER_BUSY. A waiting request is read only when its turn comes (also on the Verify Signatures page), so the limit also bounds the memory the server uses for large documents. |
| Time budget (seconds) | 60 | 10–300. Longer: 504 VERIFICATION_TIMEOUT. |
| Write the first signer's common name to the transaction log | off | Personal data (risky): only the common name, never the whole subject. |
B-LT and B-LTA are reported only when the signature carries the complete validation data (fixed). The maximum document size, the network timeout, the proxy of the outgoing calls and the blocking of private addresses are shared with signing; the page shows their values.
Verify a Test Document verifies a small fixed sample (an attached CAdES signature by a self-signed test certificate, not a certificate of this server) with the saved settings, as the Verify Signatures page does. The expected answer is "valid" with warnings; anything else means the verification of the server does not work. It is not counted and writes one transaction-log row without a client. Clear Revocation and Certificate Caches forgets the downloaded OCSP responses, CRLs and certificates (shared with signing), so the next verification downloads fresh revocation data; the action is written to the Audit Trail. Delete the Cached Trusted Lists deletes the EU trusted lists kept by the server (section 11.7); the action is written to the Audit Trail.
11.6 Trusted Certificates
The Trusted Certificates button of the Configuration page (or the link of the main page) opens the list of the certificates the verification trusts. A trust anchor is a certificate (usually a root certification authority) that the chain of a signature may reach; an intermediate only helps to build chains and is never trusted. The list is information for the reader of a report (trust.chainsToTrustedCertificate): it never makes a signature valid or invalid.

The list shows each certificate's label, role, subject, issuer, validity, SHA-256 fingerprint (compare it with the fingerprint published by the certification authority) and state: enabled, disabled, expiring in less than 30 days or expired (an expired anchor stays an anchor; signatures that chain to it get a warning: replace or disable it). Disable / Enable takes a certificate out of the verification without deleting it; Delete asks for a confirmation. To add certificates, choose a Certificate file (.cer, .crt, .pem or .p7b; every certificate of the file is added; a file with a private key is refused), its Role and an optional Label, and click Import. A certificate already in the list is refused. Every change is used by the next verification and written to the Audit Trail; the list is part of the backup.
11.7 EU trusted lists
The European Union publishes, for every member state, a trusted list of the qualified trust service providers and their services (eIDAS, Regulation (EU) No 910/2014), and one list of the lists that points to them. With Trust the qualified trust services of the EU trusted lists (eIDAS) on (the default), the server looks up the certificates of the signatures it verifies in these lists, with Secure Soft's EUTLValidator library, to tell whether they are qualified, and trusts the qualified services the lists name (below).
What the server downloads, and when:
- Nothing at the start of the server and nothing on a schedule.
- When a verified document needs it: the EU list of the lists and only the list of the country of the certificate's issuer. A document signed in Italy downloads the Italian list only; a Romanian time-stamp on it adds the Romanian list.
- The lists are kept in
App_Data\eutland used again, also after a restart. After Use a downloaded list for (days) a list is asked for again, only when a document needs it; when it did not change nothing is downloaded. A server that verifies no document for two months downloads nothing for two months. - A list whose signature does not verify is not used. When a download fails, the last good copy is used. A verification waits at most 10 seconds for a list; the download then goes on in the background for the next verifications.
- The downloads go through the proxy of the outgoing calls (section 11.2).
The lists never make a verification fail: a certificate that is not qualified, or a list that cannot be had, only means that no eIDAS mark is shown. A certificate whose authority is listed by another member state than the country in its issuer name is not found (the other countries' lists are never downloaded).
The answer is in the qualification field of the verification report of the REST API (section 16, point 6 of the report): the eIDAS mark (QESig, QESeal, AdESig-QC, AdESeal-QC) only on a valid signature whose certificate is qualified, and qualified on each time-stamp. The Verify Signatures and Sign a Test Document pages show it as a badge (section 15.2).
The EU trusted lists line of the Status page (chapter 14) shows the lists in use.
Trusting the qualified services of the lists
With the same checkbox on, a certificate the list of its country names for a qualified service becomes a trusted certificate for that one verification, as if it were in the Trusted Certificates list (section 11.6):
- for a signature, the qualified CA above a qualified certificate (never the signer's certificate itself, so its revocation is still checked);
- for a time-stamp, a qualified time-stamping unit (its own certificate may be the trusted one).
The service must be qualified at the time that is checked (the time of the signature, of the time-stamp, or now), the list must not be past its next update, and the certificate must be the one the list names (by its public key). The report then shows "anchorSource": "euTrustedList" in trust and the information trusted through … a qualified service in the EU trusted list of RO; the warning that the root is not trusted disappears.
Why it is marked ⚠: the result can differ from a server where the setting is off. Trust never makes a signature valid or invalid by itself, but when a signature does not carry its CA certificate the list completes the chain, and the revocation of the signer can then be checked: a signer revoked before the signature time is then reported invalid. The policy fingerprint changes when the setting changes, so reports made with and without it can be told apart.
It also changes the level: a trusted certificate needs no revocation data in the signature. A PAdES signature whose DSS has no OCSP response for a listed time-stamping authority is reported B-LTA with the setting on (as EU DSS does) and B-T with it off; the report lists such certificates in validationData.notNeeded.
12. Audit Trail
Menu Audit Trail. The server records every administration action, every change of the configuration and of the certificates (also of the Trusted Certificates list), every check and backup, and every error. A verification writes one line with the format, the number of signatures and the status, never the file name or the signer (section 16.12).

- Search by group, event type, level (errors are red, warnings yellow), month and text. A long message shows its first line; more shows the rest.
- 25 entries per page by default (50 or 100 can be chosen), newest first.
- Export CSV: every event of the current search, with exact times.
- Integrity: the entries are linked so that a changed, inserted or deleted entry is detected. The page checks the new entries each time it opens; Verify the Whole Trail checks all of them.
- Delete old entries: deletes the chosen month and every earlier month, to keep the trail small. The current month cannot be deleted, and the trail stays verifiable. Export the months you must keep before deleting them. Requires the administrator password.
- Client errors are recorded up to 60 per minute; the rest are counted and summarised, so that a flood of bad requests cannot fill the trail.
# 13. Transactions
Menu Transactions (after Configuration). Every signing and verification request that reached the checks of the profile or of the client is one line of the transaction log: when it came, how long it took, the channel (REST API, CSC API, Test for the administration pages, or Self-test for the tests of the Status page), the client and its IP address, the profile, the type (Sign Hash, Sign PAdES, Sign CAdES, Sign XAdES, Sign ASiC-E, Verify, Verify certificate), the size of what was received, the result, the error code and the SHA-256 values of what was received and of what was given back. A CSC request that signs several hashes or documents writes one line for each. A signing request of a known client that is refused before its profile is checked (the server busy, a malformed or interrupted body) has a line too, without profile, size or SHA-256, so every signing request of a client is counted once. Requests refused before the client is known (a wrong API key, a disabled client, an address that is not allowed, the REST API turned off) are only in the Audit Trail (chapter 12).

The documents, the digests, the signatures, the file names, the API keys and the PINs are never written. The SHA-256 value lets you answer "was this document signed (or verified) here?" without keeping the document: compute the SHA-256 of the file and search for it.
- Transaction log: Keep the entries for 30 to 3650 days (365 by default), with its own Save. The server deletes older entries by itself, at most once an hour, and writes the count to the Audit Trail (Transaction log retention). A change of the retention is written to the Audit Trail too.
- Latest transactions: the last 5 to 100 requests of this worker process, newest first, held in memory (also those not yet written to the database).
- Search the log: period (today, yesterday, the last 7 days, this or last month, any month, all periods); Type: all, Sign (every signing type) or one of them, Verify (documents and certificates) or one of them; result (completed, refused, failed); channel; client, IP address and profile. A SHA-256 value (of the input or of the output, 64 hexadecimal digits) or a request id (the
X-Request-Idthe client received) is searched across all periods. 25 lines per page by default (50 or 100), newest first. A refused request is yellow, a failed one red; the result is a badge (green: signed,ok,valid; red:invalid,failed; grey:notVerifiable,noSignatureFound; amber:refused). more shows the SHA-256 values and the request id. - Export CSV: every line of the current search (not only the page shown), UTF-8, with the columns
time_utc,duration_ms,channel,type,result,error_code,client,ip,profile,input_size,input_sha256,output_sha256,detail,request_id. - Delete entries: one month, or a month and every earlier month (also the current one). It cannot be undone; the deletion is written to the Audit Trail. Export the months you must keep first.
The Message column says the error code and, in words, the detail: the level made by a signature (and "lowered from…" when a profile allowed a lower level for missing revocation data), the signature algorithm of a hash, the format and the number of signatures of a verification. The common name of the first signer appears only when the setting of section 11.5 asks for it.
14. Status page
Everything that can stop the server from signing, in one place (menu Status).

Current state, read when the page opens: the license or the trial, the signing certificates (section 7.11), Time stamp servers (each address used by an Active profile: whether it answers, checked at most once a minute without asking for a time stamp; an error when a profile reaches none of its servers, a warning when only its fallback answers), Clock (the clock of the server against the time the time-stamp servers give; an error beyond 5 minutes: set the Windows Time service), the database, the free storage space (warning under 1 GB or under twice the database), the last backup (warning when there is none or when it is older than 30 days), the audit trail and the background work of the server, EU trusted lists (the lists in use, with their number, dates and signature; reading the page downloads nothing; a warning when a list is past its next update or could not be downloaded, section 11.7), and Signature verification: the trusted certificates, the revocation mode and, since the start, the verifications, SERVER_BUSY and VERIFICATION_TIMEOUT answers. It warns (never more: the results of the verification do not depend on it) when the verification is on and no trust anchor is enabled, or when an enabled anchor expires within 30 days or has expired, with a link to the Trusted Certificates page (section 11.6); the main page shows the same warnings. Once an hour the server writes these alerts to the Audit Trail (group Checks), each once: a trust anchor expiring (at 30 and at 7 days), the list without an anchor (once a day), at least 10 SERVER_BUSY answers in an hour (raise the concurrent verifications), at least 20 verifications in an hour with an unknown revocation status or over the time budget (the OCSP or CRL services may be unreachable). The line Alerts counts the alerts of the last 24 hours and names the newest, with a link to the Audit Trail (see Alerts below).
Tests, run by the server every day at the time you set (default 03:00, the time of the server; when the server was not running then and the last run is older than a day, a minute after it starts), and by Run the Tests Now:
- Signing test: profile: each Active profile signs a small test document (a PDF, a text, an XML document or two text files, as its type asks) with its own settings, and the result is verified by the server's verification (chapter 11) with the saved policy, also when the verification API is off. A Hash profile signs the digest of a text and the value is checked with the public key of its certificate. OK: signed at the level of the profile and verified valid by the certificate of the profile (the warnings of a certificate nobody trusts are expected). Warning: a lower level than the profile's (revocation data missing), not verifiable, or the verification ran out of time. Error: the signing was refused or failed (the reason is shown), invalid, no signature found, another certificate, or a hash signature that does not check. The tests are not counted by the trial or by any client quota, run also after the trial ended (nothing leaves the server) and write their rows to the Transactions page, channel Self-test. A profile with a time-stamp server asks it for a real time stamp at every run;
- Audit trail: the whole chain of entries;
- Database integrity: the integrity check of the whole file;
- Public address: only from the page: the address of the server answers.
The verification has its own test on the Configuration page: Verify a Test Document (section 11.5).
The result is kept and written to the Audit Trail. When something is wrong, or the daily tests did not run, the main page shows a warning with a link to this page.
Setting of this page (with its own Save, written to the Audit Trail): Run the daily tests at (HH:mm, the time of the server).
Alerts. The server keeps its own journal: every alert is a line of the Audit Trail in its database (group Checks and backups; search, export and retention as any audit entry). It writes nothing outside its database for an alert: no Windows Event Log, no registry. Point your monitoring at GET /api/v1/health (section 16.6) and read the Audit Trail, or the line Alerts of this page.
| Alert | When | How often |
|---|---|---|
STATUS_TESTS Failed / Passed with warnings | a daily test or Run the Tests Now that did not pass | each such run |
SIGNING_CERTIFICATE_EXPIRING | the certificate of an Active profile within 30 days, within 7 days (error), expired (error) | once at each |
KEY_UNAVAILABLE | a signing key cannot be loaded or did not sign | once an hour per certificate |
TSA_FAILING | a time-stamp server does not answer, or a signature got no time stamp | once an hour per server |
REVOCATION_UNAVAILABLE | the revocation data of a signing certificate could not be obtained (refused or lower level) | once an hour per certificate |
DEMO_ENDING, DEMO_LIMIT_REACHED, DEMO_EXPIRED | the trial has 7 days or 500 signatures left / stopped | once |
CLIENT_QUOTA_REACHED | a client used its signing or verification quota | once per client and quota period |
CLIENT_AUTHENTICATION_FAILURES | repeated invalid API keys or CSC logins | the summaries of the Audit Trail |
| the four verification alerts above | as described above | as above |
15. Testing the server
The server tests itself every day and lets you test every part from the administration pages, before a client relies on it. Nothing of these tests is counted by the trial or by a client quota.
15.1 Sign a Test Document
Sign a Test Document (menu Tools → Sign a Test Document, or the button of the same name on a profile's page) signs with any profile, also one that is not Active yet, so a profile can be tried before clients use it. Choose the profile and the file (a PDF for PAdES; one file for CAdES and XAdES — an XML document for an enveloped XAdES signature; one or more files for ASiC-E), then Sign. For a Hash profile type the digest in hexadecimal or Base64 (or select a file: the page computes its digest with the chosen algorithm). The profile's own settings are used, without overrides, with the same size limits as the API. The signed file is verified at once by the same code as Verify Signatures and the page shows one line: green when the signature is valid, by the profile's certificate and at the profile's level; yellow when the level was lowered, the result is "not verifiable" or the verification ran out of time; red when the signing was refused or the result is invalid. Show the full report opens the report, and Download saves the signed file (a Hash profile shows the signature value, with Copy). The signature is real (made with the profile's key) but is not counted by the trial or by any client; each one is written to the Audit Trail (Sign a Test Document page: a document signed) and appears in the Transactions page on the channel Test. Nothing is kept on the server. After the trial the page refuses to sign, like the API (DEMO_EXPIRED).

15.2 Verify Signatures
The Verify Signatures page (menu Tools → Verify Signatures, administrator login) does the same verification without a client: select the Signed file and, only for a detached signature, its Original files, then Verify (the button under the files). The result below is a short view of the report of POST /api/v1/verify: a coloured banner with the overall status (green valid, red invalid, amber not verifiable, grey no signature found) and its sentence, the document (name, size, format, validation time), then one card per signature with its status, signer and issuer (by their common name), profile, times, trust, messages and, under Details, the integrity, the signature algorithm, the signing certificate (serial, validity with the time it still had at the validation time, e.g. (21 days), (4 hours) or (expired), key), the certificate chain with the revocation status, the time-stamps and what the signature covers. The fingerprints (SHA-256 of the document and of the certificates), the policy and its fingerprint, the request id, the key usage and the algorithm OIDs are not shown on the page; they are all in the JSON report. The page also leaves out what is normal: "signed data found", an acceptable algorithm, the list of missing validation data (the row Validation data appears only when it is complete), and the warning that a PDF was updated after a signature when the later revisions only add signatures, form filling, validation data or time-stamps (it is shown for annotations and other changes); the trust through an EU trusted list is said in one short sentence. Download Report (JSON) saves exactly the JSON the API answers; Print prints the result with every detail opened.
Downloads of the result. Under the document and in each signature card, buttons save files from the result, only when they are exactly what they say:
| Button | When | What you get |
|---|---|---|
| Download the original document | a CMS signature with the document inside (.p7m) | the signed document, byte for byte, named as the upload without .p7m (contract.txt.p7m → contract.txt) |
| Download the document before the first signature | a PDF signed with incremental updates | the PDF as it was before the first signature |
| Download revision N (in each signature card) | a PDF | the PDF exactly as that signature signed it |
| Download the XML without signatures | an XML with enveloped signatures | the XML with the signatures removed (the content that was signed; not always the very same bytes) |
| Download name | an ASiC-E container with one file | that file |
| Certificate (.cer) (in each signature card) | every signature | the signing certificate alone (DER) |
A detached signature (.p7s, a detached XML signature) has no document button: its original is your own file. The files come from the page itself, as the JSON report: the server keeps nothing and is not asked again. For a document above 20 MB the document buttons are left out (a note says so); the certificates stay. The page works even when Verification API enabled is off, is not counted in any quota or in the trial, and writes one transaction-log row without a client. Nothing is kept: leaving the page discards the files and the report.

The eIDAS badge. With Trust the qualified trust services of the EU trusted lists (eIDAS) on (the default) (section 11.7), a dark-blue badge next to the status of a card shows that the EU trusted lists confirm a qualified certificate:
| Badge | Meaning |
|---|---|
| Qualified Electronic Signature | valid, qualified certificate for electronic signatures, key in a qualified device |
| Qualified Electronic Seal | the same for electronic seals |
| Advanced Electronic Signature (Seal) supported by a Qualified Certificate | advanced signature or seal with a qualified certificate (the key is not known to be in a qualified device) |
| Qualified time-stamp | a qualified electronic time-stamp (on a document time-stamp, and in the time-stamps table) |
The words are those of the EU DSS demo; the JSON report keeps its values (QESig, QESeal, AdESig-QC, AdESeal-QC). In Details → Time-stamps the authority is named by its common name; hold the mouse over it for the whole name.
The badge appears only on a valid signature whose certificate was qualified both when it was issued and at the time of the signature; hold the mouse over it to see the country, the provider and the service of the list. A row eIDAS repeats it in words. A signature that is not valid but has a qualified certificate gets only the row Qualified certificate, without the badge. Details → EU trusted list shows what the list says (status, type, QSCD, the status at the signature time); the list's provider, number and dates are in the badge's title and the JSON. A certificate that is not in the EU trusted lists simply has no badge; when a country's list is still being downloaded, an info message says so and the next verification uses it. Sign a Test Document shows the same badge in its full report.
The row Profile of each signature gives the exact profile and what it means, e.g. PAdES-BASELINE-LTA — PAdES baseline, long-term, with an archive time-stamp, CAdES-XL — CAdES legacy form X-L, PKCS7-T — PDF signature (adbe.pkcs7.detached), not PAdES, with a time-stamp, XML-NOT-ETSI-XMLDSIG — XML signature (XMLDSig), not an ETSI profile. A plain XMLDSig is accepted like any other signature: no warning about its profile.
15.3 The other tests
| Test | Where | What it proves |
|---|---|---|
| Test the Key | Signing Certificates, the page of a certificate | The account of the server can sign with the key (section 7.5). |
| Run the Tests Now | Status | Every Active profile signs a test document that the server then verifies; the audit trail and the database are intact; the public address answers (chapter 14). The same tests run every day by themselves. |
| Verify a Test Document | Configuration, Signature Verification | The verification works with the saved settings (section 11.5). |
GET api/v1/health | any HTTP client, without a key | The server can sign now (section 16.6); for your monitoring. |
15.4 From the command line
The same request as a client application, with curl (Windows 10 and later have curl.exe) and the API key of a client that may use the profile:
curl.exe https://sign.example.com/sign/api/v1/health
curl.exe -H "Authorization: Bearer <api-key>" https://sign.example.com/sign/api/v1/profilesThe first answers {"status":"healthy","version":"2.1"}, the second the profiles of the client. A whole signature from PowerShell is in the Quick start; the sample programs of chapter 18 run every endpoint.
# 16. The REST API
Applications sign through the REST API of the server. Its complete reference, with every endpoint, field and error code, is the document REST API (rest-api.md), and the server describes itself at /swagger (the interactive page) and /swagger/docs/v1 (the specification, for code generators). This chapter says what an administrator needs to know: the hash signature (section 16.7), the four document signatures (sections 16.8–16.11), the verification of signatures (section 16.12) and the CSC API (chapter 17).
16.1 Address and key
The API lives under api/v1/ of the address of the server: https://sign.example.com/api/v1/ at the root of a site, https://www.example.com/sign/api/v1/ when the server is an IIS application named sign. Every request except GET /api/v1/health carries the API key of a client (chapter 10):
Authorization: Bearer <the API key>Use HTTPS: the key and the documents travel in the request.
16.2 What a client must have
A request is signed only when all of these hold, checked in this order; the first that fails gives the answer and nothing is signed:
- the REST API is on (server settings);
- the key belongs to a client, and the address has not sent too many wrong keys;
- the client is enabled, and the address is in its IP allow-list;
- the profile exists, is Active, and is one of the client's allowed profiles (otherwise the client is told only that there is no such profile);
- the profile is of the type of the endpoint, and the request changes only fields the profile marks Overridable;
- the document is not larger than the limit of the profile and of the server;
- the client has signatures left in its quotas, and the server is licensed or in its trial;
- the certificate of the profile is valid, has the minimum remaining days of the profile, and its key can be used.
A refused request costs nothing: it uses no quota and does not count for the trial.
16.3 Errors
Every error is a JSON answer with a stable code (errorCode, for example QUOTA_EXCEEDED), an explanation, and a request id. The same id is in the X-Request-Id header of every answer and in the Audit Trail, so a client that reports an error with its request id lets you find exactly what happened. The answer never shows why a profile cannot be used, a path, a password or a key; the Audit Trail has the real reason.
16.4 Size of the documents
The maximum document size of the server settings (25 MB by default, at most 100 MB) limits every document; a profile may set a smaller one. Documents travel in Base64, a third larger, so the server accepts requests of about 4/3 of the limit plus 2 MB (36 MB for 25 MB) and refuses larger ones at once, before reading them.
The verification accepts 5 MB more than the maximum document size (30 MB for 25 MB), for the signed document and its original files together, because a signed copy is larger than the document that was signed (the signature, the certificates, the revocation data): a document signed at the limit can always be verified. GET verify/policy gives this value (limits.maxDocumentSize, in bytes). The file Web.config lets IIS accept requests up to 142 MB under api/ (a 105 MB verification in Base64), so that changing the setting never needs a change of that file.
16.5 What is logged
- Every refused or failed signing request is written to the Audit Trail (group "Signing requests") with the client, the profile, the code and the real reason. A failure of the server (the key cannot be used, a time-stamp server does not answer) is an error; a refusal because of the client is a warning.
- Every other request of the API (the list of profiles, a wrong address) is written to the Audit Trail, group "REST API", at most once per second in one batch; requests without a valid key are written up to 60 a minute and the rest counted.
- Every signing request of a known client (its API key accepted, the client enabled, the address allowed), successful or not, is one line of the Transactions log (chapter 13); a successful signature is written there only, not to the Audit Trail.
- The API key, the documents and the signatures are never written anywhere.
16.6 Health and profiles
GET /api/v1/healthneeds no key and answers{"status":"healthy","version":"2.1"}(HTTP 200) when the server can sign: the database works, the server is licensed or in its trial, the certificate of every Active profile can be used, every Active profile that needs a time stamp reaches its time-stamp server (or its fallback) and the clock of the server is within 5 minutes of theirs. The time-stamp servers are asked at most once a minute, with a plain HTTP request: no time stamp is requested, so a paid account is not charged. Otherwise it answersunhealthy(HTTP 503) without saying why: the Status page says it. The answer is computed at most once every 10 seconds and may be that old. Point your monitoring at it; it works even when the REST API is turned off.GET /api/v1/profilesgives a client the Active profiles it may use, with their settings and the summary of their certificate;GET /api/v1/profiles/{name}gives one. A client never sees the other profiles, the time-stamp servers or where the keys are.GET /api/v1/profiles/{name}/certificatedownloads the signing certificate of a profile (?format=derfor a .cer file,?chain=truefor the certificate with its issuers in one PEM file), for the systems that verify the signatures.
16.7 Sign a hash (Hash profiles)
POST /api/v1/sign/hash signs a digest that the application computed itself; the document never reaches the server:
{ "profile": "seal-hash", "digestAlgorithm": "SHA-256", "digest": "<the digest, Base64>" }digestAlgorithmmust be one of the Accepted digest algorithms of the profile (SHA-256, SHA-384, SHA-512; SHA-1 is never accepted), and the digest must have its length (32, 48 or 64 bytes); otherwise the request is refused withALGORITHM_NOT_ALLOWEDorDIGEST_LENGTH_MISMATCH.- The answer gives the signature (Base64), its algorithm by name and OID, the signing certificate and the issuer certificates the profile includes (Include certificate chain). The name is the one BouncyCastle uses (
SHA-256withRSA,SHA-256withRSAandMGF1,SHA-256withECDSA,SHA-256withPLAIN-ECDSA), so the application can verify the signature directly; OpenSSL verifies it withopenssl pkeyutl -verify. - With an RSA key the profile's RSA padding decides: PKCS#1 v1.5 (the server builds the DigestInfo) or PSS (salt as long as the hash, MGF1 with the same hash). With an EC key the profile's ECDSA output decides: DER (the X.509 and CMS form) or raw r‖s (the form of JOSE and of many tokens); a request may change it with
"overrides": {"ecdsaOutput": "raw"}only when the profile marks it Overridable. - The certificate is checked before every signature (validity, the profile's minimum remaining days, key usage, key available). The same key signs through the same pool as every other format: the Windows store, a PFX file or a PKCS#11 device (chapter 8).
- Every signed hash counts as one signature for the quota of the client and for the trial.
The server signs whatever digest an authorized client sends (the warning of the Hash profile page): give a Hash profile only to applications you trust with the key of the certificate.
16.8 Sign a PDF (PAdES profiles)
POST /api/v1/sign/pades signs a whole PDF document:
{ "profile": "invoices", "document": "<the PDF, Base64>", "fileName": "invoice-0042.pdf", "overrides": { "reason": "Approved" } }- The signature is an invisible PAdES signature (baseline B-B, or B-T with the time stamp of the profile's TSA), added to the document as an incremental update: signatures already in the document stay valid. It holds the reason, location and contact of the profile (or of the request, for the fields the profile marks Overridable), the certification of the profile, the signing certificate and the issuers of Certificates included.
fileNameis optional (1–255 characters, only a name, no path); the answer keeps it,document.pdfby default.- The answer is JSON (
content= the signed PDF in Base64,level,certificate,chain,requestId), or the signed PDF itself when the request hasAccept: application/octet-stream: then the name is inContent-Disposition, the level inX-Signature-Leveland the request id inX-Request-Id. With curl:curl -H "Authorization: Bearer <key>" -H "Content-Type: application/json" -H "Accept: application/octet-stream" --data @request.json -o signed.pdf https://<server>/api/v1/sign/pades. - A document that is not a PDF, is damaged or encrypted (with any password), or is certified with "no changes allowed" is refused with
INVALID_DOCUMENT; so is an already signed document sent to a profile that certifies (a certification must be the first signature). - B-T: when the TSA cannot be reached or does not give a valid time stamp, the server asks the fallback TSA once; when that fails too, the answer is
502 TIMESTAMP_FAILED(try again later). The reason is in the Audit Trail, with the TSA address but never the TSA user or password. - B-LT and B-LTA add the certificates and the revocation data (OCSP, CRL) of the chain, and B-LTA a document time stamp, so the signature can be validated after the certificate expires. When the revocation data cannot be obtained the answer is
502 REVOCATION_DATA_UNAVAILABLE, or a B-T signature when the profile has Allow level T (the answer'slevelsays B-T). These levels embed the whole chain of the certificate, the root included. - A refused request does not count: the quota of the client and the trial get the signature back.
16.9 Sign any file (CAdES profiles)
POST /api/v1/sign/cades signs any content (a contract, an image, an archive...):
{ "profile": "contracts-cms", "document": "<the content, Base64>", "fileName": "contract.docx", "overrides": { "detached": true } }- The signature is a CAdES signature (CMS) of the level of the profile: B-B, B-T (with the time stamp of the profile's TSA), B-LT (with the certificates and the revocation data of the chain) or B-LTA (and an archive time stamp).
- Attached (the default): the signature contains the content,
application/pkcs7-mime, namedcontract.docx.p7m(document.p7mwithout afileName). Detached: only the signature,application/pkcs7-signature, namedcontract.docx.p7s(document.p7s); keep it next to the original file, the two together are verified. - The content type (an OID,
id-databy default), the MIME type (application/octet-streamby default) and the commitment type of the profile are written in the signature; a request may changedetached,contentType,mimeTypeandcommitmentType(""= none) when the profile marks them Overridable. - The content is always signed as a file: a
.p7mor.p7ssent here gets a new signature around it, it is not co-signed. - The answer is JSON (
content= the signature in Base64) or, withAccept: application/octet-stream, the signature file itself (name inContent-Disposition, level inX-Signature-Level), as for PAdES (16.8). - The time stamp, the revocation data, the lower level of Allow level T and the refusals (
TIMESTAMP_FAILED,REVOCATION_DATA_UNAVAILABLE,KEY_UNAVAILABLE) work as for PAdES (16.8); B-LT and B-LTA embed the whole chain of the certificate, the root included.
16.10 Sign an XML document or any file (XAdES profiles)
POST /api/v1/sign/xades makes a XAdES signature:
{ "profile": "efactura", "document": "<the document, Base64>", "fileName": "invoice.xml" }- Enveloped (the default): the document must be an XML document; the answer is the same document with the signature inside (
application/xml, same name,document.xmlby default). A document with a DTD (<!DOCTYPE) or that is not well-formed XML is refused withINVALID_DOCUMENT. A document that is already signed gets one more signature; the existing ones stay valid. - Detached: the document can be any file; the answer is only the signature, an XML file named after the document (
contract.docx→contract-signature.xml). The signature names the document by itsfileName, so send the real name; keep the signature next to the original file, the two together are verified. - The level, the time stamp, the revocation data, Allow level T and the refusals work as for PAdES (16.8).
- The commitment type and the signature production place of the profile are written in the signature; a request may change
packaging(enveloped/detached),commitmentType(""= none) andproductionPlace(city,stateOrProvince,postalCode,countryNameof two letters; it replaces the whole place) when the profile marks them Overridable. - The server writes no temporary file: the document is signed in memory and is not kept.
16.11 Sign several files in one container (ASiC-E profiles)
POST /api/v1/sign/asice puts files of any type in one ASiC-E container (ETSI EN 319 162-1, a ZIP file .asice) with one XAdES signature that covers all of them:
{
"profile": "archive",
"fileName": "dossier",
"files": [
{ "fileName": "contract.pdf", "document": "<the file, Base64>" },
{ "fileName": "annex.xml", "document": "<the file, Base64>" }
]
}- The answer is the container (
application/vnd.etsi.asic-e+zip), named afterfileNamewith.asiceadded when missing (dossier.asice;container.asiceby default), in JSON or as the file itself, as for PAdES (16.8). The files keep their names, their contents and their order; an ASiC-E reader opens the container and verifies the signature. - Each file needs a name (no folder, no
/ \ : ", notmimetype, not starting withMETA-INF, unique without regard to case) and at least one byte; elseINVALID_REQUEST. - Maximum files of the profile (100 by default, at most 1000) limits the number of files (
INVALID_REQUESTabove); the maximum document size (16.4) limits the files together (DOCUMENT_TOO_LARGE). - A container is one signature for the quota and the trial, whatever the number of files.
- The level, the time stamp, the revocation data, Allow level T and the refusals work as for PAdES (16.8). An ASiC-E profile has nothing a request may change.
- The server writes no temporary file: the container is made in memory and is not kept.
16.12 Verify signatures
POST /api/v1/verify checks every signature of a signed document and answers a report. Only a client allowed to Verify (Allowed operations, section 10.2) may call it; it needs no profile. The settings of the verification and the Trusted Certificates list are in chapter 11. Send the document as JSON ({ "document": "<Base64>", "fileName": "contract.pdf" }) or as a form (multipart/form-data, part document):
curl.exe -H "Authorization: Bearer <api-key>" -F "document=@contract.pdf" https://sign.example.com/api/v1/verify- What it verifies: PDF (PAdES signatures and document time-stamps), CMS signatures (
.p7m,.p7s), XML (XAdES, enveloped or detached) and ASiC-E containers. The format is found from the bytes, never from the name. A detached signature needs the documents it signed: JSONoriginalDocuments(fileNameanddocument), or form partsoriginalDocument(at most 10). - The answer: always
200with a report when the document could be read. Each signature has astatus:valid,invalid(changed after signing, wrong signature value, or a certificate revoked before the signature time) ornotVerifiable(for example the original of a detached signature is missing), with areason. A root certificate that is not on the server, an expired certificate or an unknown revocation status are warnings only.overall.statussums up the document.options.reportDetail: "full"adds the certificate chains, the time-stamps and the files of a container;options.includeContent: truereturns the content of an attached CMS signature. - Refusals:
403 OPERATION_NOT_ALLOWED(the client may not verify),406 INVALID_REQUEST(anAcceptheader that does not allow JSON: the answers are JSON only),400 UNSUPPORTED_FORMAT,DOCUMENT_ENCRYPTED,DOCUMENT_REJECTED_BY_LIMITS,INVALID_DOCUMENT,413 DOCUMENT_TOO_LARGE(all documents together over the size limit of the verification, the maximum document size + 5 MB, 16.4),503 SERVER_BUSY(every verification slot taken: answered before the document is read, no quota used; try again afterRetry-After),504 VERIFICATION_TIMEOUT(slow OCSP or CRL services; try again later). - Quota and trial: each verification counts against the client's verification quota (section 10.4,
429 QUOTA_EXCEEDED). A trial version verifies during its 45 days up to 5,000 verifications, counted apart from the 5,000 signatures; after that403 DEMO_EXPIRED(only a report counts; signing goes on). A license lifts both. - Nothing is kept: the server stores neither the document nor the report. The Audit Trail line and the transaction log row name the format, the number of signatures and the status (plus the size, the SHA-256 of the document, the client, its address and the duration), never the file name or the signer. Only the setting "write the first signer's common name to the transaction log" (section 11.5; off by default; personal data) adds the signer's common name, never the rest of the certificate subject.
How to read a report. A short report of a PDF with one signature whose root certificate is not on the server:
{
"reportVersion": 1,
"requestId": "4f1c2a9b7d3e5f60",
"validationTime": "2026-11-30T10:00:00Z",
"document": { "fileName": "contract.pdf", "size": 182344, "sha256": "9F86D0…", "format": "pdf" },
"policy": { "name": "Server verification policy", "fingerprint": "A1B2…", "windowsRootsTrusted": false,
"revocation": "ocspThenCrl", "trustedCertificateCount": 3 },
"overall": { "status": "valid", "signatureCount": 1, "valid": 1, "invalid": 0, "notVerifiable": 0,
"explanation": "The signature is valid.", "errors": [], "warnings": [], "infos": [] },
"signatures": [ {
"id": "S-1", "index": 0, "kind": "signature", "format": "pades", "level": "B-T", "status": "valid",
"errors": [], "warnings": [ { "code": "MSG-UNTRUSTED-ROOT", "text": "…" } ], "infos": [],
"bestSignatureTime": "2026-11-20T09:00:01Z", "bestSignatureTimeSource": "timestamp",
"signer": { "subject": "CN=Example Seal,O=Example SRL,C=RO", "…": "…" },
"trust": { "chainsToTrustedCertificate": false, "status": "untrustedRoot" },
"qualification": null
} ]
}- Look at
overall.statusfirst:valid(every signature is valid),invalid(at least one is not),notVerifiable(at least one could not be checked, none is invalid) ornoSignatureFound. When exactly one signature is not valid,overall.reasonrepeats its reason. - For each signature,
statusand, when it is notvalid,reason:reasonStatus Meaning hashMismatch,signatureValueInvalidinvalid the document or the signature was changed after signing revoked,caRevokedinvalid the signer's (or a CA's) certificate was revoked before the time of the signature notYetValidinvalid the certificate was not yet valid at the time of the signature formatFailureinvalid the signature is damaged or not well formed originalMissing,signedDataNotFoundnotVerifiable the signed document (of a detached signature) or the signed part was not found signingCertificateNotFoundnotVerifiable the signer's certificate is not in the signature algorithmNotSupported,integrityNotEstablishednotVerifiable the server cannot check this signature
errors,warningsandinfoshold messages with a stablecode(MSG-…) and an English text; a program should test the code, never the text. Warnings never change the status: a root certificate that is not on the server, a certificate expired now, an unknown revocation status, a weak but allowed algorithm.profilenames the exact signature profile as the EU DSS validator does:PAdES-BASELINE-LTA,CAdES-BASELINE-T,CAdES-XL(an older long-term form),PKCS7-T(a PDF signature that is not PAdES),XML-NOT-ETSI-XMLDSIG(a plain XML signature), … Its level part is the level the server could confirm.trustis information only: whether the chain reaches a certificate of the Trusted Certificates list (section 11.6);anchorSourcesays where the trusted certificate comes from (trustedCertificates,windowsRoots, oreuTrustedListwith the setting of section 11.7). A signature can bevalidwithchainsToTrustedCertificate: false; decide in your application whether you accept that signer.validationData.notNeededlists the certificates that need no revocation data in the signature because they are trusted by this server (or above a trusted one): they do not lower the level, as in EU DSS.bestSignatureTimeis the time the server could prove (from a time-stamp), or the time of the verification;claimedSigningTimeis only what the signer wrote.qualificationis the eIDAS qualification according to the EU trusted lists (section 11.7), an extra that never changes the status.markisQESig(qualified electronic signature),QESeal(qualified electronic seal),AdESig-QC/AdESeal-QC(advanced, with a qualified certificate, key not known to be in a qualified device) ornone; the full mark only on avalidsignature whose certificate is qualified both when it was issued and at the time of the signature.certificateandtrustedListSourcesay what the list says and which list (country, provider, service, sequence number).qualificationisnullwhen it was not looked up: the setting is off, the list of the country could not be had yet (an infoMSG-QUALIFICATION-NOT-AVAILABLEsays why; the next verification uses the list), or there is no signer certificate. "Not qualified" is never a warning. In afullreport each time-stamp hasqualified(true,falseornull); a document time-stamp hasqualification.qualifiedinstead of a mark.signer.declaredQualifiedonly repeats what the certificate says about itself; when the lists do not confirm it, the infoMSG-DECLARED-NOT-CONFIRMEDsays so.policy.fingerprintidentifies the settings and the trusted certificates used: two reports with the same fingerprint were made under the same policy.
GET /api/v1/verify/policy shows what the server checks: the fingerprint of its policy (the same as in each report), the trusted certificates of the list, the revocation and algorithm settings and the limits.
POST /api/v1/verify/certificate with { "certificate": "<Base64 DER or PEM>" } (and optionally "chain": [ ... ], the issuer certificates, which only help to build the chain and are never trusted) tells whether a certificate reaches a trusted certificate of the server now, with the revocation status of each certificate of its chain. A revoked certificate is an error; everything else (not trusted, expired, status unknown) is a warning.
The Verify Signatures page does the same verification without a client (section 15.2).
16.13 The documentation pages
/swagger shows every endpoint with its fields, its error answers and an example of the request and of the answer (Example Value), and lets you try them with a key (type Bearer and the key in the box at the top). A code generator can read /swagger/docs/v1 to make a client library in your language. It holds no secret. If you do not want it public, turn it off in the server settings (section 11.3): the API keeps working.
17. The CSC API
Applications that speak the CSC API v2.0.0.2 (instead of the REST API above) can sign hashes with the profiles of a client. The contract is in docs\csc-api.md.
- Security level: SCAL1 with PIN-only access: anybody who knows the name of a client and its CSC PIN can sign with its profiles. It is meant for organization seals, not for persons; keep the IP allow-list of such a client short.
- Turn it on: the CSC API is off on a new server (every
csc/v2address answers 404). It is turned on in the CSC API section of the Configuration page (section 11.4); then give the client CSC access and a CSC PIN (10.2). - Address:
<server address>/csc/v2/, for examplehttps://sign.example.com/csc/v2/info. Every method is a POST with a JSON body. HTTPS is required for every method exceptinfo(also behind a trusted proxy that sendsX-Forwarded-Proto: https). - The steps of an application:
auth/loginwith HTTP Basic (the client name and the PIN) gives anaccess_token, valid 15 minutes.credentials/listgives the profiles the client may use (credentialID= the profile name; Hash, PAdES, CAdES and XAdES profiles);credentials/infotheir certificate, key and algorithms.credentials/authorizewith the number of signatures (at most the profile's CSC signatures per authorization, and optionally the hashes themselves) gives aSAD, valid 5 minutes.signatures/signHashwith the SAD, the hashes and the signature algorithm (an OID:sha256WithRSAEncryption, RSASSA-PSS with its parameters,ecdsa-with-SHA256, or the plain ECDSA OIDs forr ‖ s) gives the signatures, in the order of the hashes. The algorithm must match the profile (its hashes, its RSA padding, its ECDSA output).- Or
signatures/signDocwith the SAD and whole documents (Base64) of a PAdES, CAdES or XAdES profile (see below). auth/revokeends the token.
- The same rules as the REST API: client enabled, address allowed (checked on every call), profile allowed and Active, quota (a request with several hashes needs room for all of them, or nothing is signed), trial, certificate valid. Wrong PINs are throttled per address and per client (5 wrong PINs: 15 minutes), except for an address the client already logged in from.
- Errors:
{"error": "...", "error_description": "..."}with the HTTP statuses of the CSC specification (400, 401, 429, 501, 503, 500). The methods the server does not offer (OAuth 2.0, OTP, asynchronous mode, time stamps) answer 501.signatures/signDoccan be turned off in the server settings (section 11.4); it is then 501 too. - signDoc: each document has
signature_format(PPAdES,CCAdES,XXAdES: the profile's type), optionallyconformance_level(Ades-B-B…Ades-B-LTA: it must be the profile's level),signAlgo(the profile's hash with RSA or ECDSA, for examplesha256WithRSAEncryption) and optionallysigned_envelope_property(Certification/Revisionfor PAdES, as the profile;Attached/Detachedfor CAdES andEnveloped/Detachedfor XAdES, another value than the profile's only when the profile lets requests change it). Every other attribute (reason, commitment type, place…) is the profile's. The signed documents come back inDocumentWithSignature, the detached signatures inSignatureObject, in the order of the request; one request is either all attached or all detached. Each document is one signature for the SAD, the quota and the trial; if one document cannot be signed (not a PDF, XML not well-formed, no time stamp…), nothing is signed and the error names it (documents[1]: …). - Logged: every call in the Audit Trail, group CSC API (refused signing requests under "Refused signing request"); never the PIN, the token, the SAD or the hashes.
18. Sample programs in nine languages
The folder ApiSamples of the installation package (RemoteSignatureServer.zip; the Source Edition also has it as ApiSamples.zip in the folder of the server, offered by Download the API Samples on the Configuration page) has two families of small programs, one project per language in each, and every project runs on its own:
| Folder | API | Authentication | What the projects show |
|---|---|---|---|
Rest\<language> | REST API api/v1 (chapter 16) | the client's API key | signing a digest, a PDF, any content as CMS, an XML document, an ASiC-E container; verifying signatures |
Csc\<language> | CSC API v2 (chapter 17) | the client's name and CSC PIN | logging in, the credentials, hashes signed with one authorization (SAD) and checked with the certificate, a PDF, a CMS and an XML signed with signDoc |
The languages: C# (.NET 8 and .NET Framework 4.8, one Visual Studio solution per family), PowerShell, Python, JavaScript (Node.js), Java, Go, PHP, Ruby and Bash (curl and OpenSSL). Each project uses only what comes with its language, prints what it sends and what comes back, is commented step by step so you can copy the parts you need, and has a README.txt: what it does, what it needs, how to run it, its parameters, what you see and what to do when something goes wrong. ApiSamples\README.txt lists them all.
18.1 The REST projects
| # | Request | What it shows |
|---|---|---|
| 1 | GET health | is the server working (no key) |
| 2 | GET profiles | the profiles of the client; the sample takes the first one of each type and skips, with a note, the steps of a type the client may not use |
| 3 | POST sign/hash | a signature over the SHA-256 digest of a text computed by the sample (the text never leaves the computer) |
| 4 | POST sign/pades | a one-page PDF made by the sample, signed |
| 5 | POST sign/cades | a CMS signature of a text file (.p7m or .p7s, as the profile says) |
| 6 | POST sign/xades | a small XML invoice, signed |
| 7 | POST sign/asice | a container with two files and one signature |
| 8 | GET verify/policy | what the server checks when it verifies |
| 9 | POST verify (JSON) | the report of the PDF of step 4 |
| 10 | POST verify (multipart) | the report of the CMS signature of step 5, uploaded as a file with the file it signed |
| 11 | an error on purpose | a text file sent to verify: 400 UNSUPPORTED_FORMAT, and how to read errorCode, detail, requestId |
Steps 8–10 need a client allowed to Verify (Allowed operations, section 10.2); for another client they are skipped with a note. The signed files go to an output folder.
18.2 The CSC projects
| # | Request | What it shows |
|---|---|---|
| 1 | POST csc/v2/info | the CSC service: name, version, methods, signDoc formats and levels (no login) |
| 2 | POST csc/v2/auth/login | the client's name and CSC PIN (HTTP Basic) give an access token, sent as Bearer after |
| 3 | POST csc/v2/credentials/list | the client's credentials (its profiles), each with its key, certificate and signature algorithms |
| 4 | POST csc/v2/credentials/authorize, signatures/signHash | one SAD bound to the SHA-256 hashes of two texts (one when the profile's multisign is 1, as for hash in the Source Edition), then their signatures, which the sample checks with the credential's certificate (RSA in every language; ECDSA where the language has it built in: C# .NET 8, Java, Go, Ruby, Bash) |
| 5 | authorize, signatures/signDoc (P) | a one-page PDF signed with the PAdES profile, at its level |
| 6 | authorize, signatures/signDoc (C) | a CMS signature of a text file (.p7m or .p7s, as the profile says) |
| 7 | authorize, signatures/signDoc (X) | an XML invoice signed (enveloped, or a detached signature) |
| 8 | POST csc/v2/auth/revoke | ends the access token and its SADs |
The CSC API signs in two ways: signHash (the program computes the hash, the server signs only the hash, the program puts the signature into its document) and signDoc (the server receives the whole document and returns it signed, as REST does); every signature needs a SAD from credentials/authorize. The signed files go to an output folder; the REST project of the same language can verify them. A step whose credential is not one of the client's is skipped with a note. The CSC API needs HTTPS: on an http:// address a CSC project stops after step 1 (exit code 2); a refused login or a signature that does not verify stop it with an error (exit code 1).
18.3 The SignLib projects: the document stays on your computer
ApiSamples\SignLib\ holds three C# (.NET 8) projects, Pades, Cades and Xades (one solution, PKISimple.SignLibSamples.sln), built on SignLib, the signature library of the same family (https://www.signfiles.com/signature-library/). SignLib builds the signed PDF, CMS (.p7m) or XML on your computer and asks the server only for the signature value: the program computes the SHA-256 hash of what SignLib gives it and sends just those 32 bytes. Each document is signed twice, once through the REST API (POST sign/hash with the API key) and once through the CSC API (credentials/authorize with the hash bound, then signatures/signHash), and both files are verified by SignLib and by the server (POST verify). This is the pattern for documents that must not leave the organization, or for formats the server does not build.
lib\SignLib.dll is the demo version of SignLib: the signed PDFs carry a demo text, and each cryptographic operation takes 10 seconds more. With a licensed SignLib, put its serial number in Common\Settings.cs. The defaults and options are those of the REST and CSC projects (the Hash profile: --hash-profile, default hash).
18.4 Run them
Source Edition: the samples work as is. Without parameters they use the public Source Edition server https://ca.signfiles.com/sign/ and its client api-samples: the REST projects its fixed API key, the CSC projects its fixed CSC PIN and the default profiles hash, pades, cades, xades (public by intent, the same on every Source Edition server). Licensed edition: put your client's key (REST) or its name, CSC PIN and profiles (CSC), on the command line or in the environment:
| Option (PowerShell) | Environment variable | Projects | Default |
|---|---|---|---|
--url (-Url) | PKISIMPLE_SIGN_URL | both | https://ca.signfiles.com/sign/ |
--key (-Key) | PKISIMPLE_SIGN_API_KEY | Rest | the fixed key of the Source Edition |
--csc-user (-CscUser) | PKISIMPLE_SIGN_CSC_USER | Csc | api-samples |
--csc-pin (-CscPin) | PKISIMPLE_SIGN_CSC_PIN | Csc | the fixed PIN of the Source Edition |
--hash-credential (-HashCredential) | PKISIMPLE_SIGN_CSC_HASH | Csc | hash (signHash) |
--pades-credential, --cades-credential, --xades-credential (-PadesCredential, ...) | PKISIMPLE_SIGN_CSC_PADES, _CADES, _XADES | Csc | pades, cades, xades (signDoc) |
| — | PKISIMPLE_SIGN_INSECURE_TLS=1 | both | off: a test server with a self-signed HTTPS certificate is accepted (never in production) |
$env:PKISIMPLE_SIGN_URL = "https://sign.example.com/"
$env:PKISIMPLE_SIGN_API_KEY = "<api-key>"
python Rest\Python\pkisimple_rest_sample.py
$env:PKISIMPLE_SIGN_CSC_USER = "<client name>"
$env:PKISIMPLE_SIGN_CSC_PIN = "<PIN>"
python Csc\Python\pkisimple_csc_sample.pyTo try every REST step, give the client one profile of each type and tick Verify under Allowed operations; for the CSC steps, turn its CSC access on, set its PIN and allow it a Hash, a PAdES, a CAdES and an XAdES profile (section 10.2). With the test certificates of section 7.9 a report says valid with the warning MSG-UNTRUSTED-ROOT (or MSG-SELF-SIGNED): the signature is intact, and its root is not on the server's Trusted Certificates list (section 11.6).
19. Trial period and registration
- Trial version: every function works for 45 days from the first start, for at most 5,000 signatures. Every successful signature counts, a hash signature included; the tests of the administration pages do not. After either limit the server refuses the signature requests; the administration pages keep working. The main page warns when 7 days or 500 signatures are left. Verifications have their own maximum of 5,000 in the same 45 days (section 16.12); reaching it stops only the verifications.
- Register: main page → Register Now, paste the whole license text you received (line breaks and spaces do not matter) and click Register Now. The limits are lifted at once, without a restart. The license names your company and does not expire.
- The license is issued for PKISimple Remote Signature Server; each product of the family has its own license.
- Deleting files, restoring a backup or setting the clock back does not restart the trial.

20. Backup, restore, move and upgrade
20.1 Backup and restore
Menu Backup.

- A backup contains the whole database: the configuration, the signing certificates (PFX files and passwords encrypted), the profiles, the clients, the administrator account, the license and the audit trail.
- Keep with your backups the file
App_Data\settings\secret.key: without it the PFX files and the passwords of a backup cannot be read. Keep it separately from the backups. - Keys outside the backup: the keys of the Windows certificate store and of PKCS#11 devices are not in the backup. The check of a backup names these certificates: a restored server needs the same keys.
- Download a Backup or Make a Backup on the Server: a consistent copy taken while the server keeps working. Server backups are written to
App_Data\backups, which IIS never serves; copy them to separate storage. - Check the File and Restore this Backup: every file is checked before it can be restored. Before a restore the server saves its current database as
before-restore-…; every login session ends; the license of the server is kept. A restore requires the administrator password. - Move to another server: install the product, copy the
secret.keyof the old server into itsApp_Data\settings(it replaces the one the new installation made), then restore the backup there. Install the keys of the Windows store and of the devices on the new server too.
20.2 Upgrade
To install a newer build: make a backup and copy secret.key, stop the application pool, copy the new files over the old ones (never delete or replace App_Data) and start the pool again (section 3.9). The new build opens the database of the old one when they have the same database version; a database of another version is refused with a message, never changed silently. Version 2.1 is the first version of the product: there is no earlier version to upgrade from.
21. Files and folders
The server keeps all its data in the folder App_Data of the application. IIS and ASP.NET never serve this folder; the server writes nowhere else (no registry, no Windows Event Log, no file in the application folder).
21.1 The application folder
| Item | Content |
|---|---|
*.aspx, Global.asax, Web.config, bootstrap.* | The administration pages and their style. |
bin\ | The program (Remote Signature Server.dll), SignLib, X509Dll and the third-party libraries. |
bin\runtimes\win-x64\, bin\runtimes\win-x86\ | The SQLite engine for a 64-bit and a 32-bit pool. |
ApiSamples.zip | Source Edition only: the sample programs offered by Download the API Samples. |
App_Data\ | The data of the server (below). Empty in the package. |
21.2 App_Data
| File or folder | Content | Back up |
|---|---|---|
App_Data\settings\rss.db (with rss.db-wal and rss.db-shm while the server runs) | The database: the configuration, the administrator account, the signing certificates (PFX files and passwords encrypted), the profiles, the clients (only the fingerprints of their keys and PINs), the trusted certificates, the license, the audit trail and the transaction log. | yes, through the Backup page (chapter 20) |
App_Data\settings\secret.key | The key of the installation, created at the first start: it encrypts the PFX files and the passwords of the database and makes the fingerprints of the API keys. | yes, separately, protected: without it a backup cannot be used |
App_Data\settings\rssdemo.sys, signengine.sys | The state of the trial and the counters of the signatures. | no |
App_Data\settings\startup-error.txt | Written only when the database cannot be opened at a start; the reason. Moved into the audit trail and deleted when the database opens again. | no |
App_Data\settings\reset-admin.txt | Created by you to reset the administrator account (chapter 6); deleted by the server after the reset. | no |
App_Data\eutl\ | The EU trusted lists downloaded for the verification (section 11.7) and their index cache.xml. Public documents; deleted by Delete the Cached Trusted Lists. | no (downloaded again when needed) |
App_Data\backups\ | The backups made on the server (Make a Backup on the Server) and the copy before-restore-… saved before a restore. | copy them to separate storage |
Temporary files (*.tmp) of a backup or of a file being checked live in these folders only while the operation runs. The documents that are signed or verified are never written to the disk.
Do not copy rss.db while the server runs: the copy may be inconsistent. Use the Backup page, or stop the application pool first and copy rss.db together with secret.key.
21.3 What is not in App_Data
- The keys of the Windows certificate store stay in the store of the machine (or of the account of the pool).
- The keys of PKCS#11 devices stay on the devices; the server keeps the driver path, the slot, the public certificate and the PIN (encrypted).
A backup names the certificates whose keys are outside it, so that a restored server can be given the same keys (chapter 20).
# 22. Security recommendations
The recommendations below protect the three things a signing server depends on: its keys, the API keys of its clients and its administration. Most of them are steps of the installation.
22.1 Installation
- Accept the license agreement and create the administrator account at once, from the server itself (
http://localhost/...), before the server is reachable from the network. Until the account exists, the first visitor of the login page can create it (chapter 6). - Choose a strong administrator password, used for nothing else. The login page refuses an address or a user name for a while after repeated wrong passwords ("Too many failed attempts. Try again in … seconds."), and every login, failed login and logout is written to the Audit Trail. A failed login writes the user name that was typed: type the password only in the password box, or it ends up in the Audit Trail (and in the backups).
- Source Edition: the administration pages have no login. Everybody who can open them can change the certificates, the profiles and the clients, and can read the logs. Install it only where you trust everybody who can reach it, and never publish it on the internet.
22.2 HTTPS
- Use HTTPS for the whole site: add an HTTPS binding with a server (TLS) certificate (section 3.6). It protects the API keys, the CSC PINs, the documents, the administrator password and the login cookie. The CSC API refuses plain HTTP (except
info). - Turn on HSTS and the redirect to HTTPS once HTTPS works for everything on the host name (HSTS applies to the whole host name, every port and every site on it): in IIS 10 (Windows Server 2019 and later) select the site, then HSTS... in the Actions pane: Enable, Max-Age
31536000, Redirect Http to Https; or set it in your reverse proxy. - Over HTTPS the login cookie is marked Secure. All the cookies of the server are HttpOnly and SameSite=Strict, and the forms of the administration pages are bound to the login session, so a page of another site cannot make changes in the name of a logged-in administrator.
- Behind a reverse proxy that ends TLS, write the proxy in Trusted reverse proxies (section 11.1); only then are its
X-Forwarded-ForandX-Forwarded-Protoheaders believed.
22.3 Exposure of the server
| Address | Who can use it |
|---|---|
api/v1/health | Everybody: it says only healthy or unhealthy. |
api/v1/… (the REST API) | A client with a valid API key, from an allowed address. |
csc/v2/… (the CSC API) | Off by default. A client with CSC access, by its name and PIN (chapter 17). |
swagger | Everybody, while API documentation (Swagger) enabled is on: it holds no secret, but you may turn it off (section 11.3). |
| Every other page | Licensed edition: only the administrator, after the login. Source Edition: everybody. |
- If the API is offered to a wider network than the administrators, limit the networks that can open the administration pages, for example with the IP Address and Domain Restrictions feature of IIS, or publish only
api/(andcsc/, if used) through your reverse proxy or firewall. - Keep the CSC API off unless an application needs it: its PIN-only login is sole control level 1, without a second factor. Give a CSC client a long PIN and a short IP allow-list.
- The CSC client name is its login name: after repeated wrong PINs the logins of that name are refused for 15 minutes ("Too many wrong PINs were sent for this client"). Choose names that say no more than needed (no customer or person names) and keep the IP allow-list short.
22.4 Keys and certificates
- Prefer a PKCS#11 device (an HSM) for the keys of real signatures: the key never leaves the device. A PFX file is kept encrypted with the key of the installation, but whoever has both the database and
secret.keyhas the key. - The key of a PFX file is loaded in memory as an ephemeral key; where Windows requires a key file, it uses its own key folder (
C:\ProgramData\Microsoft\Crypto) for the time of the signature. Keep that folder, as the whole system disk, readable only by administrators and the account of the application pool. - Use Local Machine for the Windows store and give only the account of the application pool read access to the key (section 7.6).
- The certificates made by Create a Certificate for Tests are for tests only.
- A Hash profile signs whatever digest an authorized client sends, without seeing the document: allow it only to applications you trust with the key (chapter 9).
- Turn on Check the revocation before each signature for a certificate that may be revoked (section 7.12).
22.5 Clients and API keys
- One client per application, with only the profiles it needs, an IP allow-list and, where it makes sense, quotas: a stolen key then signs little, from few places (chapter 10).
- The API key is shown once: give it to the application through its own secret store, never in a file of the source code or in a URL. The samples read it from an environment variable (chapter 18).
- Generate a New Key at once when a key may have leaked: the old key stops working immediately.
- Check the Transactions page and the Alerts line of the Status page: a quota reached or repeated wrong keys are written to the Audit Trail.
- Source Edition: the API key and CSC PIN of the client
api-samplesare public (in the samples, on the Configuration page) and fixed, and the pages have no login. Use the Source Edition for development and evaluation, with its test certificate.
22.6 Backups and the key of the installation
- Keep
App_Data\settings\secret.keyseparately from the backups: a backup holds the PFX files and the passwords, encrypted with it. Together they are the keys of your PFX certificates. - Keep the backups away from the server, protected as the keys themselves (chapter 20).
22.7 Personal data
The server stores no document. While a large request is read (over 80 KB), ASP.NET holds it in its folder Temporary ASP.NET Files and deletes it at the end of the request: keep that folder on a protected local disk. The logs hold the names of the client applications, their IP addresses and the SHA-256 values of the documents; the common name of a signer only when Write the first signer's common name to the transaction log is on (section 11.5). Set the retention of the transaction log and delete old audit entries according to your policy (chapter 12, chapter 13).
23. Problems and solutions
The messages below are the texts that PKISimple Remote Signature Server shows on its pages or sends to the client applications. A text in italics inside a message (…) is a part that changes: a path, a number or the text of Windows. Many messages have more details in the Audit Trail (chapter 12), and the Status page (chapter 14) shows in one place everything that can stop the server from signing.
Start with the Status page and the Audit Trail: the Status page shows what is wrong now, and the Audit Trail records the real reason of every refused or failed request. A client that reports an error with its requestId lets you find the exact entry: search the Audit Trail or the Transactions page for it.
23.1 Installation and start
| Problem / message | Cause | Solution |
|---|---|---|
| An IIS error page, or no page, when you open the address of the application | ASP.NET 4.8 is not enabled in IIS, the application pool is not .NET CLR v4.0 with the Integrated pipeline, or the physical path of the application is wrong. | Check the steps of Installation on IIS. |
The application cannot write to its data folder (folder):errorGive the application pool account (or the account of the hosting plan) the right to modify this folder. | The account of the application pool cannot write in App_Data. | Give it the Modify right (section 3.5). |
The application runs in partial trust (Medium Trust): the signing keys and the PKCS#11 devices cannot be used. Ask the hosting provider to run the site in Full Trust. | A shared hosting runs the site in partial trust. | Ask the hosting provider for Full Trust. |
The database cannot be opened: … The SQLite engine was not found (path). Copy the bin folder of the server again, with its runtimes subfolder. (also in App_Data\settings\startup-error.txt) | The folder bin\runtimes (the SQLite engine e_sqlite3.dll) was not copied. | Copy the whole bin folder again, with bin\runtimes\win-x64 and bin\runtimes\win-x86. |
The database cannot be opened: … The SQLite engine (path) cannot be loaded: Windows errornumber. | Usually Windows blocks the file: the downloaded zip file was marked as blocked, so the files extracted from it are blocked too. | Right-click the zip file, Properties, tick Unblock, extract it again and copy the files. |
The database is not in WAL mode (journal modemode): the data folder must be on a local disk (not a network share). … | The application folder (and App_Data) is on a network share. | Move the application to a local disk (chapter 20 describes a move). |
The database failed its integrity check when the application started (problem) … | The database file rss.db is damaged (disk error, file copied while in use). | Restore the last good backup on the Backup page (chapter 20). |
The file App_Data\settings\startup-error.txt exists | The database could not be opened at a start; the file holds the reason. | Correct the cause. When the database opens again, the server moves the text into the Audit Trail and deletes the file. |
The server has a configuration problem. The details are shown when this page is opened on the server itself (http://localhost/...), and in the Audit Trail. | The pages show the details of a problem of the server only to a browser on the server itself. | Open the page on the server with http://localhost/…, or read the Audit Trail. |
The audit trail cannot be written (nevent(s) lost since the start; last error:error). | The database cannot be written: a full disk, a lost right, a damaged file. | Check the free space and the rights of App_Data\settings, and the Status page. |
The server is not installed yet: its administrator must open the administration pages, accept the license agreement and create the administrator account. (to every client) | The first start is not complete. | Complete it (section 3.7). |
23.2 Login and the administrator account
| Problem / message | Cause | Solution |
|---|---|---|
Too many failed attempts. Try again innseconds. | More than 5 wrong passwords from this address or for this user name. | Wait (at most 30 seconds), then type the right password. |
| The password is forgotten | — | Reset the account with the file reset-admin.txt (chapter 6). |
This connection is not encrypted (HTTP): the password is sent in clear text. … | The page was opened over HTTP. | Use HTTPS (section 3.6). |
| The session ends by itself | 30 minutes without activity, or 8 hours after the login. | Log in again. |
23.3 Signing certificates
The messages of the keys and their solutions are in section 7.7 (Windows store and PFX files) and section 8.3 (PKCS#11 devices). The most common cause is the account of the application pool, which is not allowed to use the key (section 7.6).
23.4 Errors of the REST API
Every error is a JSON answer with errorCode, detail and requestId (section 16.3). The answer says little on purpose; the Audit Trail has the real reason.
HTTP, errorCode | Cause | Solution |
|---|---|---|
401 UNAUTHORIZED | No API key, or a key that belongs to no client (revoked, regenerated, mistyped). | Give the application the current key of its client, or generate a new one (section 10.3). |
429 TOO_MANY_ATTEMPTS | Too many wrong keys from this address: blocked 1 to 15 minutes. | Correct the key of the application that sends the wrong one; wait (section 10.5). |
403 API_DISABLED | REST API enabled is off. | Turn it on (section 11.3). |
403 CLIENT_DISABLED, IP_NOT_ALLOWED | The client is disabled, or the address is not in its IP allow-list. | Enable the client or correct its list; behind a proxy, set Trusted reverse proxies (chapter 10). |
404 PROFILE_NOT_FOUND | No such profile, the profile is not Active, or the client may not use it (the client is not told which). | The Audit Trail names the real reason: tick the profile under Allowed profiles, or make it Active. |
400 PROFILE_TYPE_MISMATCH, OVERRIDE_NOT_ALLOWED | A profile of another type for this endpoint, or a field the profile does not mark Overridable. | Use the endpoint of the profile's type; remove the field or mark it Overridable (chapter 9). |
400 ALGORITHM_NOT_ALLOWED, DIGEST_LENGTH_MISMATCH | A Hash request with a digest algorithm the profile does not accept, or a digest of the wrong length. | Section 16.7. |
400 INVALID_DOCUMENT, 413 DOCUMENT_TOO_LARGE | A document that is not of the profile's kind (not a PDF, damaged, encrypted, a DTD in XML…) or larger than the limit. | Sections 16.4–16.11. |
429 QUOTA_EXCEEDED | The client used its quota of the day or of the month. | Wait for Retry-After, or raise the quota (section 10.4). |
403 DEMO_EXPIRED | The trial ended (45 days or 5,000 signatures). | Register the server (chapter 19). |
409 CERTIFICATE_NOT_VALID | The certificate of the profile is expired, not valid yet, below the profile's minimum remaining days, revoked, or outside its Private Key Usage Period. | Renew the certificate or choose another one for the profile (section 7.8). |
503 KEY_UNAVAILABLE | The key cannot be used now (device disconnected, PIN refused, rights lost). | Test the Key on the Signing Certificates page; the Audit Trail has the reason. |
502 TIMESTAMP_FAILED | The time-stamp server and its fallback did not give a valid time stamp. | Check the TSA URL and credentials of the profile, the proxy and the Status page. |
502 REVOCATION_DATA_UNAVAILABLE | B-LT / B-LTA: the OCSP or CRL of the chain could not be fetched. | Check the network and the proxy (section 11.2), or tick Allow level T in the profile. |
403 OPERATION_NOT_ALLOWED | A verification by a client that may not verify, or with Verification API enabled off. | Tick Verify for the client (section 10.2). |
400 UNSUPPORTED_FORMAT, DOCUMENT_ENCRYPTED, DOCUMENT_REJECTED_BY_LIMITS | The verification found no format it knows, an encrypted document, or a document over the limits of the verification. | Section 16.12. |
503 SERVER_BUSY from a signing endpoint (sign/pades, cades, xades, asice, CSC signDoc) | Too many document signatures at the same time. | Try again after Retry-After; raise Document signatures at the same time (chapter 11) if the server has memory and processors to spare. |
Audit warning CLIENT_DISCONNECTED | The client (or a proxy in between) closed the connection while it was still sending the request, for example a client timeout during a large upload. Not an error of the server; nothing was signed, verified or counted. | Look at the client: its timeout, its network, a proxy limit. Many of them at once can mean the server is too slow for large documents (chapter 11). |
503 SERVER_BUSY, 504 VERIFICATION_TIMEOUT | Too many verifications at the same time, or slow OCSP / CRL services. A busy server answers before it reads the document and counts nothing against the quota or the trial. | Try again after Retry-After; raise Verifications at the same time if the server has memory and processors to spare, or the Time budget (section 11.5). |
23.5 Verification results
| Result | Meaning | What to do |
|---|---|---|
valid with the warning MSG-UNTRUSTED-ROOT | The signature is intact; its root certificate is not on the Trusted Certificates list. | Import the root of the CA if you trust it (section 11.6). Trust never changes the status. |
notVerifiable, reason originalMissing | A detached signature was sent without the file it signed. | Send the original files too. |
invalid, reason hashMismatch | The document was changed after signing. | Ask the sender for the original. |
| Every report warns that the revocation was not checked | Revocation checking is None, or Fetch revocation data online is off and the signature carries no validation data. | Section 11.5. |
24. Glossary
| Term | Meaning |
|---|---|
| API key | The secret of a client application, sent as Authorization: Bearer <key> with every REST API request. Made by the server, shown once (section 10.3). |
| ASiC-E | Associated Signature Container, Extended (ETSI EN 319 162-1): a ZIP file .asice with several files and a XAdES signature that covers them. |
| Audit Trail | The journal of the server: administration actions, changes, checks, refused requests and alerts, linked so that a change is detected (chapter 12). |
| B-B, B-T, B-LT, B-LTA | The levels of the ETSI baseline signatures: basic; with a time stamp; with the validation data (certificates and revocation data); with an archive time stamp. |
| CAdES | CMS Advanced Electronic Signatures (ETSI EN 319 122): a signature of any file, attached (.p7m) or detached (.p7s). |
| Client | An application allowed to use the server, with its own API key, profiles, quotas and IP allow-list (chapter 10). |
| CMS | Cryptographic Message Syntax (RFC 5652), the format of CAdES signatures. |
| CRL | Certificate Revocation List: the list of the revoked certificates published by a certification authority. |
| CSC API | The API of the Cloud Signature Consortium for remote signatures, version 2 (chapter 17). |
| Detached / attached / enveloped | A detached signature is a separate file next to the document; an attached one contains the document; an enveloped XML signature is inside the XML document. |
| Digest (hash) | The fixed-length fingerprint of a document (SHA-256, SHA-384, SHA-512) that a Hash profile signs. |
| HSM | Hardware Security Module: a device that keeps private keys and signs with them, reached through PKCS#11. |
| Key id | The first 8 characters of the fingerprint of an API key; it names the key on the pages and in the logs. |
| OCSP | Online Certificate Status Protocol (RFC 6960): asks a responder whether a certificate is revoked. |
| Overridable | A field of a profile that a request may change (chapter 9). |
| PAdES | PDF Advanced Electronic Signatures (ETSI EN 319 142): a signature inside a PDF document. |
| PFX (P12) | A PKCS#12 file with a certificate and its private key, protected by a password. |
| PKCS#11 | The standard interface of HSMs, smart cards and USB tokens (chapter 8). |
| Profile | A named recipe of the server: the type of signature, the signing certificate and every setting of the signature (chapter 9). |
| Public address | The address of the server that the client applications use (section 11.1). |
| Request id | The id of a request, in every answer (requestId, X-Request-Id), in the Audit Trail and in the Transactions page. |
| SAD | Signature Activation Data: the short-lived authorization of the CSC API for a number of signatures. |
| secret.key | The key of the installation, in App_Data\settings: it encrypts the PFX files and passwords and must be kept with the backups (chapter 21). |
| Signing certificate | A certificate with its private key that the server signs with (chapter 7). |
| Time stamp, TSA | A proof from a Time Stamp Authority (RFC 3161) that the signature existed at a time; needed from level B-T. |
| Transactions | The log of the signing and verification requests (chapter 13). |
| Trust anchor | A certificate of the Trusted Certificates list that the chain of a signature may reach (section 11.6). |
| XAdES | XML Advanced Electronic Signatures (ETSI EN 319 132). |
25. Warning and disclaimer, trademarks
25.1 Disclaimer
Every effort has been made to make this manual of PKISimple Remote Signature Server 2.1 as complete and accurate as possible, but no warranty or fitness is implied. The information is provided on an "as is" basis. The author shall have neither liability nor responsibility to any person or entity with respect to any loss or damages arising from the information contained in this manual.
The use of the software is governed by its license agreement, the file License Agreement.txt of the installation package (the licensed edition also shows it at the first start). In case of any difference between this manual and the License Agreement, the License Agreement prevails. In short, and without replacing its text:
- The software is provided "as is", without warranty; the License Agreement limits the liability of Secure Soft (its sections 8 and 9).
- The legal effect of a signature depends on the certificate and on the key storage that the user chooses (section 5.2).
- The certificates that the software creates are test certificates, for tests only (section 5.3).
- The user who installs and operates the server is responsible for it: the signing certificates and their private keys, the client applications that it authorizes and every signature they obtain, the configuration, security, availability and backups, the trust anchors of the verification, the signature policies and the compliance with the laws and standards that apply, and the use made of the signatures (section 5.1).
- The software sends no data to Secure Soft; the user is the controller of the personal data that the server processes or records, such as the names of the client applications and IP addresses in its logs (section 6).
Source Edition: the package RemoteSignatureServer-SourceEdition.zip contains the same License Agreement.txt, but the server does not show it at the first start.
25.2 Third-party components
PKISimple Remote Signature Server contains third-party components (among them Bouncy Castle, Pkcs11Interop, Newtonsoft.Json, ASP.NET Web API, Swashbuckle, Bootstrap, Microsoft.Data.Sqlite, SQLitePCLRaw and SQLite), each under its own license. The list, the licenses and the required notices are in the file THIRD-PARTY-NOTICES.txt and in the section OTHER LICENSES of License Agreement.txt.
25.3 Trademarks
.NET, Windows, Windows Server, IIS and PowerShell are trademarks of Microsoft Corporation. Adobe, Acrobat and Reader are trademarks of Adobe Inc. Java is a trademark of Oracle and/or its affiliates. Cloud Signature Consortium is the name of its association. All other trademarks are the property of their respective owners.
25.4 About this manual
PKISimple Remote Signature Server 2.1 · User Manual. The examples use the address https://sign.example.com/sign/, which stands for the address of your server. The names of the menus and windows of Windows and of other programs can differ slightly on your computer.
The pictures of the pages of the server were taken from a test installation of version 2.1 with demonstration data.
Secure Soft SRL, 4 Vasile Conta, Piatra Neamt 610115, Romania · office@signfiles.com · https://signfiles.com/signature-server