Skip to content
No description or website provided.
Branch: master
Clone or download
Travis CI User
Travis CI User Publish
 - @govtechsg/certificate-cli@3.1.2
Latest commit 33f184a Apr 12, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Added discussion for spoofing vulnerability Jan 19, 2018
examples/sample-certs updated to schema 1.5 (#40) Apr 12, 2019
lib Added some tets Feb 4, 2019
scripts benchmarks Mar 13, 2019
src updated to schema 1.5 (#40) Apr 12, 2019
test Added more tests Feb 7, 2019
.eslintignore Added eslint Feb 7, 2018
.eslintrc.json Web3 integration (#8) Feb 19, 2018
.gitignore updated to schema 1.5 (#40) Apr 12, 2019
.travis.yml updated to schema 1.5 (#40) Apr 12, 2019
LICENSE Add License (#27) Mar 14, 2018
README.md Added versioning Feb 11, 2019
index.js updated to schema 1.5 (#40) Apr 12, 2019
lerna.json lerna Apr 12, 2019
package-lock.json updated to schema 1.5 (#40) Apr 12, 2019
package.json Publish Apr 12, 2019

README.md

Certificate CLI tool

Setup

npm install

Batching Certificates

This command process all certificates in the input directory and issue all of them in a single batch. It will then add the signature to the individual certificates.

./index.js batch <PathToUnsignedCertificates> <PathToSignedCertificates>

Example:

./index.js batch ./certificates/raw-certificates/ ./certificates/processed-certificates/

2019-02-11T08:37:44.848Z info: Batch Certificate Root: 0xf51030c5751a646284c898cff0f9d833c64a50d6f307b61f2c96c3c838b13bfc

Verifying All Signed Certificate in a Directory

This command verifies that the certificate (and all it's evidence) is valid and is part of the certificate batch. However, it does not verify that the batch's merkle root is stored on the blockchain. User will need to verify that the certificate has indeed been issued by checking with the issuer's smart contract.

./index.js verify-all <PathToCertificate>

Example:

./index.js verify-all ./certificates/processed-certificates

2019-02-11T08:38:36.767Z info: All certificates in ./certificates/processed-certificates is verified

Verifying Single Signed Certificate

sign This command verifies that the certificate (and all it's evidence) is valid and is part of the certificate batch. However, it does not verify that the batch's merkle root is stored on the blockchain. User will need to verify that the certificate has indeed been issued by checking with the issuer's smart contract.

./index.js verify <PathToCertificate>

Example:

./index.js verify ./certificates/processed-certificates/urn:uuid:08b1f10a-6bf0-46c8-bbfd-64750b0d73ef.json

2019-02-11T08:41:17.301Z info: Certificate's signature is valid!
2019-02-11T08:41:17.302Z warn: Warning: Please verify this certificate on the blockchain with the issuer's certificate store.

Certificate privacy filter

This allows certificate holders to generate valid certificates which hides certain evidences. Useful for hiding grades lol.

./index.js filter <inputCertificatePath> <outputCertificatePath> [filters...]

Example:

./index.js filter signed/example1.json signed/example1.out.json transcript.0.grade transcript.1.grade

2019-02-11T08:43:50.643Z info: Obfuscated certificate saved to: signed/example1.out.json

Version

./index.js --version

Test

npm run test
You can’t perform that action at this time.