peculiarventures / cades.js Goto Github PK
View Code? Open in Web Editor NEWCAdESjs is an implementation of CAdES (CMS Advanced Electronic Signatures)in pure Javascript.
License: Other
CAdESjs is an implementation of CAdES (CMS Advanced Electronic Signatures)in pure Javascript.
License: Other
Hello, is it possible to generate CAdES signature (via CAdES.js) using a smartcard-based key?
In particular, can CAdES.js and Fortify be used synergically?
Hi,
in README you are talking about PAdESjs - a javascript implementation for PAdES.
You are still working on this? Or any informations about that?
After successfully installing dependencies from project root using npm install. I then tried to run npm run build from CAdES.js-master\examples\CAdESComplexExample dir and got the following output:
> @ build C:\Users\Nikola\Stcejorp\CloudSig\CaDES\CAdES.js-master\examples\CAdESComplexExample
> rollup -c && sed -f ../script.sed es6.js > ../../test/cadesComplexExample.js
es6.js → bundle.js, ../../test/browser/cadesComplexExample.js...
(!) Circular dependency: ..\..\node_modules\pkijs\src\common.js -> ..\..\node_modules\pkijs\src\CryptoEngine.js -> ..\..\node_modules\pkijs\src\common.js
(!) Circular dependency: ..\..\node_modules\pkijs\src\common.js -> ..\..\node_modules\pkijs\src\CryptoEngine.js -> ..\..\node_modules\pkijs\src\PublicKeyInfo.js -> ..\..\node_modules\pkijs\src\common.js
(!) Circular dependency: ..\..\node_modules\pkijs\src\SafeContents.js -> ..\..\node_modules\pkijs\src\SafeBag.js -> ..\..\node_modules\pkijs\src\SafeContents.js
created bundle.js, ../../test/browser/cadesComplexExample.js in 2.4s
'sed' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ build: `rollup -c && sed -f ../script.sed es6.js > ../../test/cadesComplexExample.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Nikola\AppData\Roaming\npm-cache\_logs\2019-10-02T14_09_55_174Z-debug.log
Добрый день!
Пытаюсь собрать пример с помощью следующих команд:
//... а потом
npm run build:examples
вторая падает:
> [email protected] build:examples /home/jetbird/workspace/alt/CAdES.js
> npm run ex1
> [email protected] ex1 /home/jetbird/workspace/alt/CAdES.js
> cd examples/CAdESComplexExample && npm run build && cd ../..
> @ build /home/jetbird/workspace/alt/CAdES.js/examples/CAdESComplexExample
> rollup -c && sed -f ../script.sed es6.js > ../../test/cadesComplexExample.js
es6.js → bundle.js, ../../test/browser/cadesComplexExample.js...
[!] TypeError: Cannot use 'in' operator to search for 'signedAttrs' in undefined
TypeError: Cannot use 'in' operator to search for 'signedAttrs' in undefined
at in (/home/jetbird/workspace/alt/CAdES.js/node_modules/rollup/dist/rollup.js:10099:49)
at BinaryExpression.getLiteralValueAtPath (/home/jetbird/workspace/alt/CAdES.js/node_modules/rollup/dist/rollup.js:10119:16)
at IfStatement.getTestValue (/home/jetbird/workspace/alt/CAdES.js/node_modules/rollup/dist/rollup.js:10742:31)
at IfStatement.hasEffects (/home/jetbird/workspace/alt/CAdES.js/node_modules/rollup/dist/rollup.js:10677:73)
at BlockStatement$$1.hasEffects (/home/jetbird/workspace/alt/CAdES.js/node_modules/rollup/dist/rollup.js:9946:22)
at ForOfStatement$$1.hasEffects (/home/jetbird/workspace/alt/CAdES.js/node_modules/rollup/dist/rollup.js:10618:23)
at ForOfStatement$$1.NodeBase.shouldBeIncluded (/home/jetbird/workspace/alt/CAdES.js/node_modules/rollup/dist/rollup.js:9236:38)
at BlockStatement$$1.include (/home/jetbird/workspace/alt/CAdES.js/node_modules/rollup/dist/rollup.js:9954:22)
at FunctionDeclaration$$1.NodeBase.include (/home/jetbird/workspace/alt/CAdES.js/node_modules/rollup/dist/rollup.js:9165:23)
at FunctionDeclaration$$1.FunctionNode.include (/home/jetbird/workspace/alt/CAdES.js/node_modules/rollup/dist/rollup.js:9498:34)
npm ERR! Linux 4.14.30-un-def-alt0.M80P.1
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
npm ERR! node v6.11.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! @ build: `rollup -c && sed -f ../script.sed es6.js > ../../test/cadesComplexExample.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ build script 'rollup -c && sed -f ../script.sed es6.js > ../../test/cadesComplexExample.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! rollup -c && sed -f ../script.sed es6.js > ../../test/cadesComplexExample.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! Please include the following file with any support request:
npm ERR! /home/jetbird/workspace/alt/CAdES.js/examples/CAdESComplexExample/npm-debug.log
npm ERR! Linux 4.14.30-un-def-alt0.M80P.1
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "ex1"
npm ERR! node v6.11.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] ex1: `cd examples/CAdESComplexExample && npm run build && cd ../..`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] ex1 script 'cd examples/CAdESComplexExample && npm run build && cd ../..'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the cadesjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cd examples/CAdESComplexExample && npm run build && cd ../..
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs cadesjs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls cadesjs
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/jetbird/workspace/alt/CAdES.js/npm-debug.log
npm ERR! Linux 4.14.30-un-def-alt0.M80P.1
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "build:examples"
npm ERR! node v6.11.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build:examples: `npm run ex1`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build:examples script 'npm run ex1'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the cadesjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run ex1
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs cadesjs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls cadesjs
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/jetbird/workspace/alt/CAdES.js/npm-debug.log
до этого делал npm install в каталоге CAdES.js.
P.S.
вопрос не совсем по теме, но все же (просто не знаю, у кого еще спросить): существует ли какая-нибудь открытая библиотека или инструментарий для создания/проверки подписи в формате CAdES, в частности, CAdES Long Type 1, на C++? Или Python? Насколько это трудоемко? Есть ли какой-нибудь tutorial, где для чайников расписано, как это делается? :)
Steps to reproduce:
npm run ex1
Result:
npm run ex1
[email protected] ex1
cd examples/CAdESComplexExample && npm run build && cd ../..
build rollup -c && sed -f ../script.sed es6.js > ../../test/cadesComplexExample.js
es6.js → bundle.js, ../../test/browser/cadesComplexExample.js...
(!) Circular dependencies
../../node_modules/pkijs/src/common.js -> ../../node_modules/pkijs/src/CryptoEngine.js -> ../../node_modules/pkijs/src/common.js
../../node_modules/pkijs/src/common.js -> ../../node_modules/pkijs/src/CryptoEngine.js -> ../../node_modules/pkijs/src/PublicKeyInfo.js -> ../../node_modules/pkijs/src/common.js
../../node_modules/pkijs/src/SafeContents.js -> ../../node_modules/pkijs/src/SafeBag.js -> ../../node_modules/pkijs/src/SafeContents.js
[!] Error: 'getParametersValue' is not exported by ../../node_modules/pvutils/build/utils.js, imported by ../../node_modules/asn1js/src/asn1.js
https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module
../../node_modules/asn1js/src/asn1.js (35:9)
33: */
34: //**************************************************************************************
35: import { getParametersValue, padNumber, isEqualBuffer, bufferToHexCodes, checkBufferParams, utilToBase, utilFromBase, utilEncodeTC, utilDecodeTC, utilConcatBuf, utilConcatView } from "pvutils";
^
36: //**************************************************************************************
37: //region Other utility functions
Error: 'getParametersValue' is not exported by ../../node_modules/pvutils/build/utils.js, imported by ../../node_modules/asn1js/src/asn1.js
at error (/home/zdravko/code/work/code/js-toolbox/CAdES.js/node_modules/rollup/dist/shared/rollup.js:198:30)
at Module.error (/home/zdravko/code/work/code/js-toolbox/CAdES.js/node_modules/rollup/dist/shared/rollup.js:12477:16)
at Module.traceVariable (/home/zdravko/code/work/code/js-toolbox/CAdES.js/node_modules/rollup/dist/shared/rollup.js:12835:29)
at ModuleScope.findVariable (/home/zdravko/code/work/code/js-toolbox/CAdES.js/node_modules/rollup/dist/shared/rollup.js:11465:39)
at ChildScope.findVariable (/home/zdravko/code/work/code/js-toolbox/CAdES.js/node_modules/rollup/dist/shared/rollup.js:6433:38)
at ClassBodyScope.findVariable (/home/zdravko/code/work/code/js-toolbox/CAdES.js/node_modules/rollup/dist/shared/rollup.js:6433:38)
at ChildScope.findVariable (/home/zdravko/code/work/code/js-toolbox/CAdES.js/node_modules/rollup/dist/shared/rollup.js:6433:38)
at FunctionScope.findVariable (/home/zdravko/code/work/code/js-toolbox/CAdES.js/node_modules/rollup/dist/shared/rollup.js:6433:38)
at ChildScope.findVariable (/home/zdravko/code/work/code/js-toolbox/CAdES.js/node_modules/rollup/dist/shared/rollup.js:6433:38)
at Identifier.bind (/home/zdravko/code/work/code/js-toolbox/CAdES.js/node_modules/rollup/dist/shared/rollup.js:7724:40)
I've tried to add @rollup/plugin-commonjs to the rollup config in examples. This makes the build to pass, but handleParsingFile
is not in bundle.js and the example doesn't run. Any ideas?
Hi,
I'm trying to install CAdES.js with 'npm install' but something goes wrong.
The console output
"Uncaught SyntaxError: Unexpected token *" in es6.js
Which is the correct way of installing it?
I'm trying also to link this library with Fortify. Can you help me please?
thank you
There was a bad link in the package.json, need to do a new update of the npm.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.