Open raziel057 opened 3 years ago
That's strange, it works when I put the result of sign in a file:
$ echo '{"A": 1234}' | npm run sign | tail -1 > test.b45
lallement@Apollon:~/Projects/ehn-sign-verify-javascript-trivial$ cat test.b45 | npm run verify
> euvac@0.0.1 verify /home/lallement/Projects/ehn-sign-verify-javascript-trivial
> node cose_verify.js
{
"A": 1234
}
Hi @raziel057, I have the same problem. Any news about this?
Hi, I think I am running in a same (or similar issue). I am on a macOS Big Sur, npm 6.14.5. When I do a npm install, I get some warnings:
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/erdtman/aes-ccm/releases/download/1.0.10/aes_ccm-v1.0.10-node-v79-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for aes-ccm@1.0.10 and node@13.3.0 (node-v79 ABI, unknown) (falling back to source compile with node-gyp)
Then, if I try to run echo '{"A": 1234}' | npm run sign | npm run verify
, I get some errors, probably misconfigured or missing modules:
❯ echo '{"A": 1234}' | npm run sign | npm run verify
> euvac@0.0.1 verify /Users/Nacho/Downloads/ehn-sign-verify-javascript-trivial-main
> node cose_verify.js
internal/modules/cjs/loader.js:621
throw e;
^
Error: No valid exports main found for '/Users/Nacho/Downloads/ehn-sign-verify-javascript-trivial-main/node_modules/pako'
at resolveExportsTarget (internal/modules/cjs/loader.js:618:9)
at applyExports (internal/modules/cjs/loader.js:499:14)
at resolveExports (internal/modules/cjs/loader.js:548:12)
at Function.Module._findPath (internal/modules/cjs/loader.js:650:22)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:948:27)
at Function.Module._load (internal/modules/cjs/loader.js:854:27)
at Module.require (internal/modules/cjs/loader.js:1023:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/Users/Nacho/Downloads/ehn-sign-verify-javascript-trivial-main/cose_sign.js:6:14)
at Module._compile (internal/modules/cjs/loader.js:1128:30) {
code: 'MODULE_NOT_FOUND'
}
internal/modules/cjs/loader.js:621
throw e;
^
Error: No valid exports main found for '/Users/Nacho/Downloads/ehn-sign-verify-javascript-trivial-main/node_modules/pako'
at resolveExportsTarget (internal/modules/cjs/loader.js:618:9)
at applyExports (internal/modules/cjs/loader.js:499:14)
at resolveExports (internal/modules/cjs/loader.js:548:12)
at Function.Module._findPath (internal/modules/cjs/loader.js:650:22)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:948:27)
at Function.Module._load (internal/modules/cjs/loader.js:854:27)
at Module.require (internal/modules/cjs/loader.js:1023:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/Users/Nacho/Downloads/ehn-sign-verify-javascript-trivial-main/cose_verify.js:6:14)
at Module._compile (internal/modules/cjs/loader.js:1128:30) {
code: 'MODULE_NOT_FOUND'
}
npmnpm ERR! code ELIFECYCLE
ERR! npmcode ELIFECYCLE
ERR! errno 1
npm ERR! errno 1
npm ERR! euvac@0.0.1 sign: `node cose_sign.js`
npm ERR! Exit status 1
npm ERR!npm
npm ERR!ERR! Failed at the euvac@0.0.1 sign script.
npm ERR! euvac@0.0.1 verify: `node cose_verify.js`
This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the euvac@0.0.1 verify script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm
ERR! /Users/Nacho/.npm/_logs/2021-07-29T17_43_09_599Z-debug.log
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Nacho/.npm/_logs/2021-07-29T17_43_09_598Z-debug.log
This seems a problem with euvac?
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! euvac@0.0.1 sign: `node cose_sign.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the euvac@0.0.1 sign script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Nacho/.npm/_logs/2021-07-29T17_44_13_170Z-debug.log
Hi,
I followed the steps described in your README and could installed the project successfully on Linux:
I generated the CSCA and DSC with
./gen-csca-dsc.sh
:But when I run the command echo
"{'A': 1234}" | npm run sign | npm run verify
I got the following issue:Please note that
npm run sign
gives the following result: