This API allows signing of content over an HTTP server. The API supports various endpoints for signing and managing certificates.
URL: /sign
Method: POST
Description: This endpoint signs the provided content.
Request:
{
"data": "string", // The content to be signed
"hashAlgorithm": "string", // The hash algorithm to use (optional)
"encoding": "string" // The encoding of the content (optional)
}
Response:
{
"signature": "string" // The generated signature
}
URL: /certificates
Method: GET
Description: This endpoint returns the list of available certificates.
Request: None
Response:
[
{
"id": "string", // The certificate ID
"subject": "string", // The certificate subject
"issuer": "string", // The certificate issuer
"validFrom": "string", // Valid from
"validTo": "string" // Valid to
}
]
URL: /certificates
Method: POST
Description: This endpoint adds a new certificate.
Request:
{
"certificate": "string", // The certificate in PEM format
"privateKey": "string" // The private key in PEM format
}
Response:
{
"message": "string" // Success message
}
400 Bad Request
: Invalid request401 Unauthorized
: Unauthorized500 Internal Server Error
: Server error
Example Signature Request
Request:
{
"data": "Hello, World!",
"hashAlgorithm": "SHA256",
"encoding": "utf-8"
}
Response:
{
"signature": "MEUCIQDh...=="
}