cool#9992 doc electronic sign: send the hash to be signed #10593
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Once the hash is extracted from the document, we need to send it to the
3rd-party for signing.
Given that we don't want to send the entire document, our signature
container should not be an entire PDF file, we just want this for the
signature binary itself (PKCS#7 blob), set the file type to "cades",
which does exactly this.
This requires passing the API URL, and credentials to
L.Control.ESignature.
Finally allow communicating with these hosts in the CSP headers.
Initially I attempted to take the URL from CheckFileInfo, but we seem to
decide this when serving cool.html, so that order doesn't allow making
the CSP headers depend on the CheckFileInfo response. In practice only 2
public servers implement this protocol (production and test), so just
allow them for now, similar to Zotero. If there is a need for a custom
server later, it can be always added to net.content_security_policy in
coolwsd.xml.
Signed-off-by: Miklos Vajna vmiklos@collabora.com
Change-Id: If1dfa50defb37205e54b2f3708f7bdaeab22afce