Skip to content

REST API to sign with client side hashing #128

Answered by martincorr
martincorr asked this question in Q&A
Discussion options

You must be logged in to vote

Ive got it working. For everyone's information...

Here https://docs.keyfactor.com/signserver/latest/open-api-specification it defines the open api for the rest api.
there is a field called encoding - the api examples NONE. Theres no info I can see what are the possible values for this field.
I tried BASE64 and calculated the hash as a b64 byte array.

That worked:

sending to https://signserver.local/signserver/rest/v1/workers/workerid/process
data: { "metaData": { "USING_CLIENTSUPPLIED_HASH" : "true", "CLIENTSIDE_HASHDIGESTALGORITHM": "SHA-256" }, "encoding": "BASE64", "data": "EAfg35LnwZfzMkHXUv3K31PlX8wqWDLhV3qsm2OFB8g=" }
<Response [200]>
archiveId : 0083bf69a48a44bb0ce6b4c2936fca82f21f…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by martincorr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant