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

feat(*): template signing and verification #688

Merged
merged 31 commits into from Aug 19, 2021

Conversation

sanketshevkar
Copy link
Member

Closes #671

The developer while creating the archive can sign the template using a private key stored in a PKCS#12 keystore.

Changes

  • A new method added in the Template class that signs the hash of the contract text, logic and model of a template and returns an object containing signatory's metadata, timestamp, signatory's certificate, signature.
  • A new node package added (node-forge), helps in handling keystores and crypto material inside it.
  • An optional parameter, keyStore added to toArchive method in Template class using which the developer/author can pass the keystore path and password.
  • An optional parameter signatureObject added to toArchive method of TemplateSaver class that will save the object containing signatory's metadata, timestamp, signatory's certificate, signature, in a signature.json file inside the .cta archive.

Flags

  • Test for the new and updated methods is yet to be written.

Related Issues

Author Checklist

  • Ensure you provide a DCO sign-off for your commits using the --signoff option of git commit.
  • Vital features and changes captured in unit and/or integration tests
  • Commits messages follow AP format
  • Extend the documentation, if necessary
  • Merging to master from fork:branchname

sanketshevkar and others added 30 commits August 16, 2021 22:36
Signed-off-by: sanket shevkar <shevkar.sanket@gmail.com>
…t - accordproject#671

Signed-off-by: Sanket Shevkar <shevkar.sanket@gmail.com>
…rdproject#671

Signed-off-by: Sanket Shevkar <shevkar.sanket@gmail.com>
Signed-off-by: Sanket Shevkar <shevkar.sanket@gmail.com>
…ject#671

Signed-off-by: Sanket Shevkar <shevkar.sanket@gmail.com>
Signed-off-by: Sanket Shevkar <shevkar.sanket@gmail.com>
Signed-off-by: Sanket Shevkar <shevkar.sanket@gmail.com>
Signed-off-by: Sanket Shevkar <shevkar.sanket@gmail.com>
Signed-off-by: Sanket Shevkar <shevkar.sanket@gmail.com>
Signed-off-by: Sanket Shevkar <shevkar.sanket@gmail.com>


Signed-off-by: Sanket Shevkar <shevkar.sanket@gmail.com>
…ject#671

Signed-off-by: Sanket Shevkar <shevkar.sanket@gmail.com>
Signed-off-by: Sanket Shevkar <shevkar.sanket@gmail.com>
Signed-off-by: Sanket Shevkar <shevkar.sanket@gmail.com>
Signed-off-by: Sanket Shevkar <shevkar.sanket@gmail.com>
Signed-off-by: sanketshevkar <shevkar.sanket@gmail.com>
Signed-off-by: sanketshevkar <shevkar.sanket@gmail.com>
Signed-off-by: sanketshevkar <shevkar.sanket@gmail.com>
…roject#671

Signed-off-by: sanketshevkar <shevkar.sanket@gmail.com>
Signed-off-by: sanketshevkar <shevkar.sanket@gmail.com>
…#671

Signed-off-by: sanketshevkar <shevkar.sanket@gmail.com>
…#671

Signed-off-by: sanketshevkar <shevkar.sanket@gmail.com>
Signed-off-by: sanket shevkar <shevkar.sanket@gmail.com>
Signed-off-by: sanketshevkar <shevkar.sanket@gmail.com>
Signed-off-by: sanket shevkar <shevkar.sanket@gmail.com>
Signed-off-by: sanketshevkar <shevkar.sanket@gmail.com>
Signed-off-by: sanket shevkar <shevkar.sanket@gmail.com>
Signed-off-by: sanketshevkar <shevkar.sanket@gmail.com>
Signed-off-by: sanket shevkar <shevkar.sanket@gmail.com>
Signed-off-by: sanketshevkar <shevkar.sanket@gmail.com>
Signed-off-by: sanket shevkar <shevkar.sanket@gmail.com>
Signed-off-by: sanketshevkar <shevkar.sanket@gmail.com>
Signed-off-by: sanket shevkar <shevkar.sanket@gmail.com>
Signed-off-by: sanket shevkar <sanket@sankets-MacBook-Air.local>
Signed-off-by: sanket shevkar <shevkar.sanket@gmail.com>
Signed-off-by: sanket shevkar <shevkar.sanket@gmail.com>
Signed-off-by: sanket shevkar <shevkar.sanket@gmail.com>
@sanketshevkar sanketshevkar changed the base branch from gsoc-contract-design to master August 17, 2021 03:56
Copy link
Member

@mttrbrts mttrbrts left a comment

Choose a reason for hiding this comment

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

This is looking very strong. Nearly there!

packages/cicero-cli/test/cli.js Show resolved Hide resolved
packages/cicero-cli/test/cli.js Show resolved Hide resolved
packages/cicero-cli/test/cli.js Show resolved Hide resolved
packages/cicero-cli/test/cli.js Show resolved Hide resolved
packages/cicero-core/package.json Show resolved Hide resolved
packages/cicero-core/src/template.js Outdated Show resolved Hide resolved
Signed-off-by: sanket shevkar <shevkar.sanket@gmail.com>
Copy link
Member

@jeromesimeon jeromesimeon left a comment

Choose a reason for hiding this comment

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

👍

@jeromesimeon jeromesimeon merged commit c7199d8 into accordproject:master Aug 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Method for template signing and verification in Template class
3 participants