Closed Hexagon closed 2 years ago
Thanks for the awesome work! Will review asap
Really great changes, thanks! I did a quick review and all looks good.
A few points open:
\r
- I assume that you actually want this to be a global replace?@JamesCullum Glad to hear it looks ok!
It's changed where it's needed in the code, the background is that node crypto uses algorithm names without dash (https://nodejs.org/api/crypto.html#class-hash) while webcrypto includes the dash (https://nodejs.org/api/webcrypto.html#rsahashedimportparamshash)
Fixed in next commit
The following changes is made to Readme.md
--save
on npm install commandvar
to const
in example implementationsFixed in next commit. Also added CRLF-line endings to one of the pem fixtures, to make sure it works as intended.
Additional changes:
Replaced npm run test
with npm run build
in testing pipeline. npm run build
run these steps:
npm run test
npx rollup
(to generate dist/main.cjs
and test/dist/*.js
npm run test:dist
Removed ./test.js
Updated changelog in PR description
Thanks for the awesome work - looking forward to the Deno PR 👍
Overview
PR based on https://github.com/Hexagon/webauthn but ported back to fido2-lib directory structure and code conventions.
Changelog
Fixes
Added
Added new module
keyUtils.js
, which take care of conversion between different key formats (cose, jwk, pem) using jose and webcrypto.Adds dependecies
Additional build steps in
package.json
npm run build
runs esm test, builds cjs distributable, and tests cjsnpm run test:dist
It makes no sense to run this separately, only usebuild
, which includes this stepChanged
Bumps major version to
3.0.0
All code ported to ESM
All code portable between node/deno/browser. For example
Buffer
->ArrayBuffer
/Uint8Array
100% ready for Deno, but the Deno-specific files is not included now, to keep the PR as clean as possible.
Upgraded all code to more recent standards (replaced
var
withlet
orconst
etc.)Moved external dependencies and related utilities to a separate toolbox
lib/toolbox.js
Moved
fixtures/
totest/fixtures
Moved all fixture-likes in
test/
totest/fixtures
Documentation update
Updated dependencies
Replaced dependencies
Removed
Removed old commonjs entrypoint
index.js
- as the package is converted to module,.js
files is not usable for commonjs, so it's not possible to keep it for commonjs imports.Converted signing and hashing functions from Node Crypto to webcrypto.
Removed
./test.js
, did not fill any function and used Node specific imports. Good to have this removed before major bump.Removed dependencies
Comments