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
Issue #671
Author Checklist
[x] 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
Closes #671
The developer while creating the archive can sign the template using a private key stored in a PKCS#12 keystore.
Changes
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.keyStore
added totoArchive
method inTemplate
class using which the developer/author can pass the keystore path and password.signatureObject
added totoArchive
method ofTemplateSaver
class that will save the object containing signatory's metadata, timestamp, signatory's certificate, signature, in asignature.json
file inside the .cta archive.Flags
Related Issues
Author Checklist
--signoff
option of git commit.master
fromfork:branchname