Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cool#9992 doc electronic sign: add menu item to trigger hash extract #10572

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

vmiklos
Copy link
Contributor

@vmiklos vmiklos commented Nov 22, 2024

In short, the trouble with signing with PEM files is that many CAs won't
hand out software certs for signing, need to use a 3rd-party to do the
signing. This requires hash-extract / upload / sign / download /
serialize pipeline on our side.

This commit starts with the first step, to extract a hash of the
document to be signed.

Given that the hash depends on the time (the signed document has a
signature widget, and that contains a timestamp), also get that from
core. Do this with a new menu item of the Draw / PDF UI: only visible
when the user private info from WOPI has a ESignatureBaseUrl key, which
will be the API server we'll talk to in the future. (So all this is
hidden by default, allowing this add this incrementally.)

Also fix a missing make dependency, so COOL_JS.m4 gets rebuilt on adding
a new .ts file, to avoid the need to do a 'make clean' on adding a new
file, which sounded odd.

Signed-off-by: Miklos Vajna vmiklos@collabora.com
Change-Id: Ib9f15fc1448eea4a4fa1784cf0d9b3de00c44019

In short, the trouble with signing with PEM files is that many CAs won't
hand out software certs for signing, need to use a 3rd-party to do the
signing. This requires hash-extract / upload / sign / download /
serialize pipeline on our side.

This commit starts with the first step, to extract a hash of the
document to be signed.

Given that the hash depends on the time (the signed document has a
signature widget, and that contains a timestamp), also get that from
core. Do this with a new menu item of the Draw / PDF UI: only visible
when the user private info from WOPI has a ESignatureBaseUrl key, which
will be the API server we'll talk to in the future. (So all this is
hidden by default, allowing this add this incrementally.)

Also fix a missing make dependency, so COOL_JS.m4 gets rebuilt on adding
a new .ts file, to avoid the need to do a 'make clean' on adding a new
file, which sounded odd.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ib9f15fc1448eea4a4fa1784cf0d9b3de00c44019
@vmiklos
Copy link
Contributor Author

vmiklos commented Nov 22, 2024

https://cpci.cbg.collabora.co.uk:8080/job/github_online_master_debug_vs_co-24.04/3399/console failed in:

unit-synthetic-lok

./run-wsdunit unit-synthetic-lok passes for me locally, retry.

@vmiklos
Copy link
Contributor Author

vmiklos commented Nov 22, 2024

https://cpci.cbg.collabora.co.uk:8080/job/github_online_master_debug_vs_co-24.04/3403/console failed in an usual way:

FATAL: command execution failed
java.io.EOFException

I'm not sure why that happened, retry.

@vmiklos
Copy link
Contributor Author

vmiklos commented Nov 22, 2024

https://cpci.cbg.collabora.co.uk:8080/job/github_online_master_debug_vs_co-24.04_cypress_desktop/2822/console failed in:

calc/searchbar_spec.js

retry to see if that happens again.

@vmiklos
Copy link
Contributor Author

vmiklos commented Nov 22, 2024

@vmiklos
Copy link
Contributor Author

vmiklos commented Nov 22, 2024

@vmiklos
Copy link
Contributor Author

vmiklos commented Nov 22, 2024

@vmiklos vmiklos requested a review from caolanm November 22, 2024 14:00
@vmiklos
Copy link
Contributor Author

vmiklos commented Nov 22, 2024

@caolanm could you please review this? Thanks.

I followed Zotero as an example, just done in TS.

Copy link
Contributor

@caolanm caolanm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see some existing ts files have:

/* -- tab-width: 4 -- */

at the top and some have

/* -- js-indent-level: 8 -- */

So there doesn't seem to be a current consistently applied set of modelines for .ts files

@caolanm caolanm merged commit da54d22 into master Nov 22, 2024
13 checks passed
@caolanm caolanm deleted the private/vmiklos/master branch November 22, 2024 15:05
@vmiklos
Copy link
Contributor Author

vmiklos commented Nov 22, 2024

I believe those are for Emacs and I'm not an Emacs user, so I was just looking for a header/footer in README.FILENOTICES.md and that seemed to suggest just a top comment, no modeline. CC @eszkadev in case something else is wanted for new files.

(Vim defaults to tabs, so no modelines for js/ts and modelines for C++ is what we want there, I guess.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants