freezerwatch 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +40 -0
- data/Rakefile +1 -0
- data/bin/console +14 -0
- data/bin/freezerwatch +9 -0
- data/bin/setup +7 -0
- data/freezerwatch.gemspec +23 -0
- data/lib/freezerwatch.rb +5 -0
- data/lib/freezerwatch/version.rb +3 -0
- data/node_modules/.bin/freezerwatch +139 -0
- data/node_modules/freezerwatch/.npmignore +3 -0
- data/node_modules/freezerwatch/.ruby-version +1 -0
- data/node_modules/freezerwatch/Gemfile +4 -0
- data/node_modules/freezerwatch/Gemfile.lock +79 -0
- data/node_modules/freezerwatch/LICENSE +23 -0
- data/node_modules/freezerwatch/README.md +41 -0
- data/node_modules/freezerwatch/Rakefile +13 -0
- data/node_modules/freezerwatch/freezerwatch.js +139 -0
- data/node_modules/freezerwatch/metrics/bigfiles_high_water_mark +1 -0
- data/node_modules/freezerwatch/metrics/cane_high_water_mark +1 -0
- data/node_modules/freezerwatch/metrics/flay_high_water_mark +1 -0
- data/node_modules/freezerwatch/metrics/flog_high_water_mark +1 -0
- data/node_modules/freezerwatch/metrics/punchlist_high_water_mark +2 -0
- data/node_modules/freezerwatch/metrics/reek_high_water_mark +1 -0
- data/node_modules/freezerwatch/metrics/rubocop_high_water_mark +1 -0
- data/node_modules/freezerwatch/node_modules/async/.jshintrc +25 -0
- data/node_modules/freezerwatch/node_modules/async/.travis.yml +6 -0
- data/node_modules/freezerwatch/node_modules/async/CHANGELOG.md +65 -0
- data/node_modules/freezerwatch/node_modules/async/LICENSE +19 -0
- data/node_modules/freezerwatch/node_modules/async/README.md +1803 -0
- data/node_modules/freezerwatch/node_modules/async/bower.json +43 -0
- data/node_modules/freezerwatch/node_modules/async/component.json +17 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/base.css +182 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/index.html +73 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/base.css +182 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/index.html +73 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/lib/async.js.html +3900 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/lib/index.html +73 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/prettify.css +1 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/prettify.js +1 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/sorter.js +156 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov.info +1452 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lib/async.js.html +3597 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lib/index.html +73 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/prettify.css +1 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/prettify.js +1 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/sort-arrow-sprite.png +0 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/sorter.js +156 -0
- data/node_modules/freezerwatch/node_modules/async/lib/async.js +1191 -0
- data/node_modules/freezerwatch/node_modules/async/nyc_output/5074.json +1 -0
- data/node_modules/freezerwatch/node_modules/async/package.json +96 -0
- data/node_modules/freezerwatch/node_modules/async/support/sync-package-managers.js +53 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/.npmignore +15 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/Client.js +60 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/Device.js +38 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/DeviceRawReadStream.js +36 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/DeviceSingleRawReadStream.js +29 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/DeviceStream.js +35 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/LICENSE +23 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/README.md +25 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/index.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/.npmignore +2 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/.travis.yml +12 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/LICENSE +55 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/README.md +364 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/index.js +156 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/lib/copy.js +8 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/lib/debug.js +7 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/lib/getSafe.js +34 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/lib/optional.js +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/.bin/uuid +26 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/aws-sign2/LICENSE +55 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/aws-sign2/README.md +4 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/aws-sign2/index.js +202 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/aws-sign2/package.json +46 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/forever-agent/LICENSE +55 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/forever-agent/README.md +4 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/forever-agent/index.js +119 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/forever-agent/package.json +45 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/License +19 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/Readme.md +175 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/lib/form_data.js +351 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/.travis.yml +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/LICENSE +19 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/README.md +1647 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/bower.json +38 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/component.json +16 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js +1123 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/package.json +84 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/support/sync-package-managers.js +53 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/License +19 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md +132 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js +188 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/.npmignore +2 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License +19 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile +7 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md +154 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js +99 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json +42 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/common.js +6 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js +38 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-auto-pause.js +21 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-pause.js +14 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream.js +48 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-handle-source-errors.js +15 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-max-data-size.js +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-pipe-resumes.js +13 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-proxy-readable.js +13 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/run.js +7 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json +60 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/package.json +80 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/.npmignore +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/.travis.yml +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/LICENSE +24 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/Makefile +10 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/README.md +627 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/example/usage.js +78 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/images/hawk.png +0 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/images/logo.png +0 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/index.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/browser.js +485 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/client.js +367 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/crypto.js +111 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/index.js +15 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/server.js +524 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/utils.js +183 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/.npmignore +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE +24 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/Makefile +11 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/README.md +6 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/images/boom.png +0 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/index.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js +207 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/package.json +64 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js +245 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE +24 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile +11 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md +6 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js +68 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json +65 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js +101 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/.npmignore +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE +33 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile +10 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/README.md +436 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png +0 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/index.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js +132 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js +585 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/package.json +70 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js +86 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js +1078 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/.npmignore +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/.travis.yml +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE +24 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile +11 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/README.md +68 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js +16 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/examples/time.js +25 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/index.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js +409 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/package.json +65 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/test/index.js +359 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/package.json +70 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/browser.js +771 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/client.js +206 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/crypto.js +86 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/index.js +316 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/message.js +246 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/readme.js +98 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/server.js +686 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/uri.js +456 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/utils.js +120 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/.dir-locals.el +6 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/.npmignore +7 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/LICENSE +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/README.md +79 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/http_signing.md +296 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/index.js +26 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/parser.js +304 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/signer.js +178 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/util.js +304 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/verify.js +42 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/.npmignore +2 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/LICENSE +19 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/README.md +50 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/errors.js +13 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/index.js +27 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/reader.js +267 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/types.js +36 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/writer.js +317 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/index.js +20 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json +63 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/reader.test.js +172 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js +296 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md +126 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js +245 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json +45 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/.npmignore +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG +78 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/LICENSE +24 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/README +82 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/README.old +298 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/ctf.js +245 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/ctio.js +1485 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/ctype.js +944 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/man/man3ctype/ctio.3ctype +241 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json +42 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsl.conf +129 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsstyle +839 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/package.json +72 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/.npmignore +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/CHANGELOG.md +14 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/LICENSE +15 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/Makefile +35 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/README.md +52 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/package.json +68 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/stringify.js +27 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/test/mocha.opts +2 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/test/stringify_test.js +246 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/LICENSE +19 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/README.md +66 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/mime.js +114 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/package.json +57 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/test.js +84 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/types/mime.types +1588 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/types/node.types +77 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/.npmignore +2 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/LICENSE.md +21 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/README.md +243 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/README.md +53 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu +174 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/bench.sh +34 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c +34 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js +84 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/bin/uuid +26 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/bower.json +23 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/component.json +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/package.json +65 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/test/compare_v1.js +63 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/test/test.html +17 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/test/test.js +228 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/uuid.js +247 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/LICENSE +55 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/README.md +4 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/index.js +43 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/package.json +48 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/test.js +49 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/.gitmodules +6 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/.npmignore +7 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/Readme.md +58 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/index.js +366 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/package.json +55 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/.jshintrc +72 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/.npmignore +3 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/LICENSE +78 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/README.md +380 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js +230 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/lib/cookie.js +947 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/lib/memstore.js +102 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js +69 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt +20 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/node_modules/punycode/README.md +176 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json +81 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js +530 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/package.json +63 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/public-suffix.txt +5229 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/test.js +1340 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tunnel-agent/LICENSE +55 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tunnel-agent/README.md +4 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tunnel-agent/index.js +227 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tunnel-agent/package.json +45 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/package.json +74 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/request.js +1244 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/package.json +34 -0
- data/node_modules/freezerwatch/node_modules/optparse/README.md +163 -0
- data/node_modules/freezerwatch/node_modules/optparse/TODO +1 -0
- data/node_modules/freezerwatch/node_modules/optparse/examples/browser-test.html +75 -0
- data/node_modules/freezerwatch/node_modules/optparse/examples/nodejs-test.js +86 -0
- data/node_modules/freezerwatch/node_modules/optparse/lib/optparse.js +309 -0
- data/node_modules/freezerwatch/node_modules/optparse/package.json +46 -0
- data/node_modules/freezerwatch/node_modules/optparse/seed.yml +5 -0
- data/node_modules/freezerwatch/node_modules/osenv/.npmignore +13 -0
- data/node_modules/freezerwatch/node_modules/osenv/.travis.yml +9 -0
- data/node_modules/freezerwatch/node_modules/osenv/LICENSE +15 -0
- data/node_modules/freezerwatch/node_modules/osenv/README.md +63 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-homedir/index.js +24 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-homedir/license +21 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-homedir/package.json +70 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-homedir/readme.md +33 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-tmpdir/index.js +25 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-tmpdir/license +21 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-tmpdir/package.json +70 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-tmpdir/readme.md +36 -0
- data/node_modules/freezerwatch/node_modules/osenv/osenv.js +72 -0
- data/node_modules/freezerwatch/node_modules/osenv/package.json +76 -0
- data/node_modules/freezerwatch/node_modules/osenv/test/unix.js +71 -0
- data/node_modules/freezerwatch/node_modules/osenv/test/windows.js +74 -0
- data/node_modules/freezerwatch/node_modules/osenv/x.tap +39 -0
- data/node_modules/freezerwatch/package.json +37 -0
- metadata +384 -0
@@ -0,0 +1,20 @@
|
|
1
|
+
// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.
|
2
|
+
|
3
|
+
// If you have no idea what ASN.1 or BER is, see this:
|
4
|
+
// ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc
|
5
|
+
|
6
|
+
var Ber = require('./ber/index');
|
7
|
+
|
8
|
+
|
9
|
+
|
10
|
+
///--- Exported API
|
11
|
+
|
12
|
+
module.exports = {
|
13
|
+
|
14
|
+
Ber: Ber,
|
15
|
+
|
16
|
+
BerReader: Ber.Reader,
|
17
|
+
|
18
|
+
BerWriter: Ber.Writer
|
19
|
+
|
20
|
+
};
|
@@ -0,0 +1,63 @@
|
|
1
|
+
{
|
2
|
+
"author": {
|
3
|
+
"name": "Mark Cavage",
|
4
|
+
"email": "mcavage@gmail.com"
|
5
|
+
},
|
6
|
+
"contributors": [
|
7
|
+
{
|
8
|
+
"name": "David Gwynne",
|
9
|
+
"email": "loki@animata.net"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"name": "Yunong Xiao",
|
13
|
+
"email": "yunong@joyent.com"
|
14
|
+
}
|
15
|
+
],
|
16
|
+
"name": "asn1",
|
17
|
+
"description": "Contains parsers and serializers for ASN.1 (currently BER only)",
|
18
|
+
"version": "0.1.11",
|
19
|
+
"repository": {
|
20
|
+
"type": "git",
|
21
|
+
"url": "git://github.com/mcavage/node-asn1.git"
|
22
|
+
},
|
23
|
+
"main": "lib/index.js",
|
24
|
+
"engines": {
|
25
|
+
"node": ">=0.4.9"
|
26
|
+
},
|
27
|
+
"dependencies": {},
|
28
|
+
"devDependencies": {
|
29
|
+
"tap": "0.1.4"
|
30
|
+
},
|
31
|
+
"scripts": {
|
32
|
+
"pretest": "which gjslint; if [[ \"$?\" = 0 ]] ; then gjslint --nojsdoc -r lib -r tst; else echo \"Missing gjslint. Skipping lint\"; fi",
|
33
|
+
"test": "tap ./tst"
|
34
|
+
},
|
35
|
+
"_npmUser": {
|
36
|
+
"name": "mcavage",
|
37
|
+
"email": "mcavage@gmail.com"
|
38
|
+
},
|
39
|
+
"_id": "asn1@0.1.11",
|
40
|
+
"_engineSupported": true,
|
41
|
+
"_npmVersion": "1.1.0-beta-4",
|
42
|
+
"_nodeVersion": "v0.6.6",
|
43
|
+
"_defaultsLoaded": true,
|
44
|
+
"dist": {
|
45
|
+
"shasum": "559be18376d08a4ec4dbe80877d27818639b2df7",
|
46
|
+
"tarball": "http://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz"
|
47
|
+
},
|
48
|
+
"maintainers": [
|
49
|
+
{
|
50
|
+
"name": "mcavage",
|
51
|
+
"email": "mcavage@gmail.com"
|
52
|
+
}
|
53
|
+
],
|
54
|
+
"directories": {},
|
55
|
+
"_shasum": "559be18376d08a4ec4dbe80877d27818639b2df7",
|
56
|
+
"_resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz",
|
57
|
+
"_from": "asn1@0.1.11",
|
58
|
+
"bugs": {
|
59
|
+
"url": "https://github.com/mcavage/node-asn1/issues"
|
60
|
+
},
|
61
|
+
"readme": "ERROR: No README data found!",
|
62
|
+
"homepage": "https://github.com/mcavage/node-asn1#readme"
|
63
|
+
}
|
@@ -0,0 +1,172 @@
|
|
1
|
+
// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.
|
2
|
+
|
3
|
+
var test = require('tap').test;
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
///--- Globals
|
8
|
+
|
9
|
+
var BerReader;
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
///--- Tests
|
14
|
+
|
15
|
+
test('load library', function(t) {
|
16
|
+
BerReader = require('../../lib/index').BerReader;
|
17
|
+
t.ok(BerReader);
|
18
|
+
try {
|
19
|
+
new BerReader();
|
20
|
+
t.fail('Should have thrown');
|
21
|
+
} catch (e) {
|
22
|
+
t.ok(e instanceof TypeError, 'Should have been a type error');
|
23
|
+
}
|
24
|
+
t.end();
|
25
|
+
});
|
26
|
+
|
27
|
+
|
28
|
+
test('read byte', function(t) {
|
29
|
+
var reader = new BerReader(new Buffer([0xde]));
|
30
|
+
t.ok(reader);
|
31
|
+
t.equal(reader.readByte(), 0xde, 'wrong value');
|
32
|
+
t.end();
|
33
|
+
});
|
34
|
+
|
35
|
+
|
36
|
+
test('read 1 byte int', function(t) {
|
37
|
+
var reader = new BerReader(new Buffer([0x02, 0x01, 0x03]));
|
38
|
+
t.ok(reader);
|
39
|
+
t.equal(reader.readInt(), 0x03, 'wrong value');
|
40
|
+
t.equal(reader.length, 0x01, 'wrong length');
|
41
|
+
t.end();
|
42
|
+
});
|
43
|
+
|
44
|
+
|
45
|
+
test('read 2 byte int', function(t) {
|
46
|
+
var reader = new BerReader(new Buffer([0x02, 0x02, 0x7e, 0xde]));
|
47
|
+
t.ok(reader);
|
48
|
+
t.equal(reader.readInt(), 0x7ede, 'wrong value');
|
49
|
+
t.equal(reader.length, 0x02, 'wrong length');
|
50
|
+
t.end();
|
51
|
+
});
|
52
|
+
|
53
|
+
|
54
|
+
test('read 3 byte int', function(t) {
|
55
|
+
var reader = new BerReader(new Buffer([0x02, 0x03, 0x7e, 0xde, 0x03]));
|
56
|
+
t.ok(reader);
|
57
|
+
t.equal(reader.readInt(), 0x7ede03, 'wrong value');
|
58
|
+
t.equal(reader.length, 0x03, 'wrong length');
|
59
|
+
t.end();
|
60
|
+
});
|
61
|
+
|
62
|
+
|
63
|
+
test('read 4 byte int', function(t) {
|
64
|
+
var reader = new BerReader(new Buffer([0x02, 0x04, 0x7e, 0xde, 0x03, 0x01]));
|
65
|
+
t.ok(reader);
|
66
|
+
t.equal(reader.readInt(), 0x7ede0301, 'wrong value');
|
67
|
+
t.equal(reader.length, 0x04, 'wrong length');
|
68
|
+
t.end();
|
69
|
+
});
|
70
|
+
|
71
|
+
|
72
|
+
test('read boolean true', function(t) {
|
73
|
+
var reader = new BerReader(new Buffer([0x01, 0x01, 0xff]));
|
74
|
+
t.ok(reader);
|
75
|
+
t.equal(reader.readBoolean(), true, 'wrong value');
|
76
|
+
t.equal(reader.length, 0x01, 'wrong length');
|
77
|
+
t.end();
|
78
|
+
});
|
79
|
+
|
80
|
+
|
81
|
+
test('read boolean false', function(t) {
|
82
|
+
var reader = new BerReader(new Buffer([0x01, 0x01, 0x00]));
|
83
|
+
t.ok(reader);
|
84
|
+
t.equal(reader.readBoolean(), false, 'wrong value');
|
85
|
+
t.equal(reader.length, 0x01, 'wrong length');
|
86
|
+
t.end();
|
87
|
+
});
|
88
|
+
|
89
|
+
|
90
|
+
test('read enumeration', function(t) {
|
91
|
+
var reader = new BerReader(new Buffer([0x0a, 0x01, 0x20]));
|
92
|
+
t.ok(reader);
|
93
|
+
t.equal(reader.readEnumeration(), 0x20, 'wrong value');
|
94
|
+
t.equal(reader.length, 0x01, 'wrong length');
|
95
|
+
t.end();
|
96
|
+
});
|
97
|
+
|
98
|
+
|
99
|
+
test('read string', function(t) {
|
100
|
+
var dn = 'cn=foo,ou=unit,o=test';
|
101
|
+
var buf = new Buffer(dn.length + 2);
|
102
|
+
buf[0] = 0x04;
|
103
|
+
buf[1] = Buffer.byteLength(dn);
|
104
|
+
buf.write(dn, 2);
|
105
|
+
var reader = new BerReader(buf);
|
106
|
+
t.ok(reader);
|
107
|
+
t.equal(reader.readString(), dn, 'wrong value');
|
108
|
+
t.equal(reader.length, dn.length, 'wrong length');
|
109
|
+
t.end();
|
110
|
+
});
|
111
|
+
|
112
|
+
|
113
|
+
test('read sequence', function(t) {
|
114
|
+
var reader = new BerReader(new Buffer([0x30, 0x03, 0x01, 0x01, 0xff]));
|
115
|
+
t.ok(reader);
|
116
|
+
t.equal(reader.readSequence(), 0x30, 'wrong value');
|
117
|
+
t.equal(reader.length, 0x03, 'wrong length');
|
118
|
+
t.equal(reader.readBoolean(), true, 'wrong value');
|
119
|
+
t.equal(reader.length, 0x01, 'wrong length');
|
120
|
+
t.end();
|
121
|
+
});
|
122
|
+
|
123
|
+
|
124
|
+
test('anonymous LDAPv3 bind', function(t) {
|
125
|
+
var BIND = new Buffer(14);
|
126
|
+
BIND[0] = 0x30; // Sequence
|
127
|
+
BIND[1] = 12; // len
|
128
|
+
BIND[2] = 0x02; // ASN.1 Integer
|
129
|
+
BIND[3] = 1; // len
|
130
|
+
BIND[4] = 0x04; // msgid (make up 4)
|
131
|
+
BIND[5] = 0x60; // Bind Request
|
132
|
+
BIND[6] = 7; // len
|
133
|
+
BIND[7] = 0x02; // ASN.1 Integer
|
134
|
+
BIND[8] = 1; // len
|
135
|
+
BIND[9] = 0x03; // v3
|
136
|
+
BIND[10] = 0x04; // String (bind dn)
|
137
|
+
BIND[11] = 0; // len
|
138
|
+
BIND[12] = 0x80; // ContextSpecific (choice)
|
139
|
+
BIND[13] = 0; // simple bind
|
140
|
+
|
141
|
+
// Start testing ^^
|
142
|
+
var ber = new BerReader(BIND);
|
143
|
+
t.equal(ber.readSequence(), 48, 'Not an ASN.1 Sequence');
|
144
|
+
t.equal(ber.length, 12, 'Message length should be 12');
|
145
|
+
t.equal(ber.readInt(), 4, 'Message id should have been 4');
|
146
|
+
t.equal(ber.readSequence(), 96, 'Bind Request should have been 96');
|
147
|
+
t.equal(ber.length, 7, 'Bind length should have been 7');
|
148
|
+
t.equal(ber.readInt(), 3, 'LDAP version should have been 3');
|
149
|
+
t.equal(ber.readString(), '', 'Bind DN should have been empty');
|
150
|
+
t.equal(ber.length, 0, 'string length should have been 0');
|
151
|
+
t.equal(ber.readByte(), 0x80, 'Should have been ContextSpecific (choice)');
|
152
|
+
t.equal(ber.readByte(), 0, 'Should have been simple bind');
|
153
|
+
t.equal(null, ber.readByte(), 'Should be out of data');
|
154
|
+
t.end();
|
155
|
+
});
|
156
|
+
|
157
|
+
|
158
|
+
test('long string', function(t) {
|
159
|
+
var buf = new Buffer(256);
|
160
|
+
var o;
|
161
|
+
var s =
|
162
|
+
'2;649;CN=Red Hat CS 71GA Demo,O=Red Hat CS 71GA Demo,C=US;' +
|
163
|
+
'CN=RHCS Agent - admin01,UID=admin01,O=redhat,C=US [1] This is ' +
|
164
|
+
'Teena Vradmin\'s description.';
|
165
|
+
buf[0] = 0x04;
|
166
|
+
buf[1] = 0x81;
|
167
|
+
buf[2] = 0x94;
|
168
|
+
buf.write(s, 3);
|
169
|
+
var ber = new BerReader(buf.slice(0, 3 + s.length));
|
170
|
+
t.equal(ber.readString(), s);
|
171
|
+
t.end();
|
172
|
+
});
|
@@ -0,0 +1,296 @@
|
|
1
|
+
// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.
|
2
|
+
|
3
|
+
var test = require('tap').test;
|
4
|
+
var sys = require('sys');
|
5
|
+
|
6
|
+
///--- Globals
|
7
|
+
|
8
|
+
var BerWriter;
|
9
|
+
|
10
|
+
var BerReader;
|
11
|
+
|
12
|
+
|
13
|
+
///--- Tests
|
14
|
+
|
15
|
+
test('load library', function(t) {
|
16
|
+
BerWriter = require('../../lib/index').BerWriter;
|
17
|
+
t.ok(BerWriter);
|
18
|
+
t.ok(new BerWriter());
|
19
|
+
t.end();
|
20
|
+
});
|
21
|
+
|
22
|
+
|
23
|
+
test('write byte', function(t) {
|
24
|
+
var writer = new BerWriter();
|
25
|
+
|
26
|
+
writer.writeByte(0xC2);
|
27
|
+
var ber = writer.buffer;
|
28
|
+
|
29
|
+
t.ok(ber);
|
30
|
+
t.equal(ber.length, 1, 'Wrong length');
|
31
|
+
t.equal(ber[0], 0xC2, 'value wrong');
|
32
|
+
|
33
|
+
t.end();
|
34
|
+
});
|
35
|
+
|
36
|
+
|
37
|
+
test('write 1 byte int', function(t) {
|
38
|
+
var writer = new BerWriter();
|
39
|
+
|
40
|
+
writer.writeInt(0x7f);
|
41
|
+
var ber = writer.buffer;
|
42
|
+
|
43
|
+
t.ok(ber);
|
44
|
+
t.equal(ber.length, 3, 'Wrong length for an int: ' + ber.length);
|
45
|
+
t.equal(ber[0], 0x02, 'ASN.1 tag wrong (2) -> ' + ber[0]);
|
46
|
+
t.equal(ber[1], 0x01, 'length wrong(1) -> ' + ber[1]);
|
47
|
+
t.equal(ber[2], 0x7f, 'value wrong(3) -> ' + ber[2]);
|
48
|
+
|
49
|
+
t.end();
|
50
|
+
});
|
51
|
+
|
52
|
+
|
53
|
+
test('write 2 byte int', function(t) {
|
54
|
+
var writer = new BerWriter();
|
55
|
+
|
56
|
+
writer.writeInt(0x7ffe);
|
57
|
+
var ber = writer.buffer;
|
58
|
+
|
59
|
+
t.ok(ber);
|
60
|
+
t.equal(ber.length, 4, 'Wrong length for an int');
|
61
|
+
t.equal(ber[0], 0x02, 'ASN.1 tag wrong');
|
62
|
+
t.equal(ber[1], 0x02, 'length wrong');
|
63
|
+
t.equal(ber[2], 0x7f, 'value wrong (byte 1)');
|
64
|
+
t.equal(ber[3], 0xfe, 'value wrong (byte 2)');
|
65
|
+
|
66
|
+
t.end();
|
67
|
+
});
|
68
|
+
|
69
|
+
|
70
|
+
test('write 3 byte int', function(t) {
|
71
|
+
var writer = new BerWriter();
|
72
|
+
|
73
|
+
writer.writeInt(0x7ffffe);
|
74
|
+
var ber = writer.buffer;
|
75
|
+
|
76
|
+
t.ok(ber);
|
77
|
+
t.equal(ber.length, 5, 'Wrong length for an int');
|
78
|
+
t.equal(ber[0], 0x02, 'ASN.1 tag wrong');
|
79
|
+
t.equal(ber[1], 0x03, 'length wrong');
|
80
|
+
t.equal(ber[2], 0x7f, 'value wrong (byte 1)');
|
81
|
+
t.equal(ber[3], 0xff, 'value wrong (byte 2)');
|
82
|
+
t.equal(ber[4], 0xfe, 'value wrong (byte 3)');
|
83
|
+
|
84
|
+
t.end();
|
85
|
+
});
|
86
|
+
|
87
|
+
|
88
|
+
test('write 4 byte int', function(t) {
|
89
|
+
var writer = new BerWriter();
|
90
|
+
|
91
|
+
writer.writeInt(0x7ffffffe);
|
92
|
+
var ber = writer.buffer;
|
93
|
+
|
94
|
+
t.ok(ber);
|
95
|
+
|
96
|
+
t.equal(ber.length, 6, 'Wrong length for an int');
|
97
|
+
t.equal(ber[0], 0x02, 'ASN.1 tag wrong');
|
98
|
+
t.equal(ber[1], 0x04, 'length wrong');
|
99
|
+
t.equal(ber[2], 0x7f, 'value wrong (byte 1)');
|
100
|
+
t.equal(ber[3], 0xff, 'value wrong (byte 2)');
|
101
|
+
t.equal(ber[4], 0xff, 'value wrong (byte 3)');
|
102
|
+
t.equal(ber[5], 0xfe, 'value wrong (byte 4)');
|
103
|
+
|
104
|
+
t.end();
|
105
|
+
});
|
106
|
+
|
107
|
+
|
108
|
+
test('write boolean', function(t) {
|
109
|
+
var writer = new BerWriter();
|
110
|
+
|
111
|
+
writer.writeBoolean(true);
|
112
|
+
writer.writeBoolean(false);
|
113
|
+
var ber = writer.buffer;
|
114
|
+
|
115
|
+
t.ok(ber);
|
116
|
+
t.equal(ber.length, 6, 'Wrong length');
|
117
|
+
t.equal(ber[0], 0x01, 'tag wrong');
|
118
|
+
t.equal(ber[1], 0x01, 'length wrong');
|
119
|
+
t.equal(ber[2], 0xff, 'value wrong');
|
120
|
+
t.equal(ber[3], 0x01, 'tag wrong');
|
121
|
+
t.equal(ber[4], 0x01, 'length wrong');
|
122
|
+
t.equal(ber[5], 0x00, 'value wrong');
|
123
|
+
|
124
|
+
t.end();
|
125
|
+
});
|
126
|
+
|
127
|
+
|
128
|
+
test('write string', function(t) {
|
129
|
+
var writer = new BerWriter();
|
130
|
+
writer.writeString('hello world');
|
131
|
+
var ber = writer.buffer;
|
132
|
+
|
133
|
+
t.ok(ber);
|
134
|
+
t.equal(ber.length, 13, 'wrong length');
|
135
|
+
t.equal(ber[0], 0x04, 'wrong tag');
|
136
|
+
t.equal(ber[1], 11, 'wrong length');
|
137
|
+
t.equal(ber.slice(2).toString('utf8'), 'hello world', 'wrong value');
|
138
|
+
|
139
|
+
t.end();
|
140
|
+
});
|
141
|
+
|
142
|
+
test('write buffer', function(t) {
|
143
|
+
var writer = new BerWriter();
|
144
|
+
// write some stuff to start with
|
145
|
+
writer.writeString('hello world');
|
146
|
+
var ber = writer.buffer;
|
147
|
+
var buf = new Buffer([0x04, 0x0b, 0x30, 0x09, 0x02, 0x01, 0x0f, 0x01, 0x01,
|
148
|
+
0xff, 0x01, 0x01, 0xff]);
|
149
|
+
writer.writeBuffer(buf.slice(2, buf.length), 0x04);
|
150
|
+
ber = writer.buffer;
|
151
|
+
|
152
|
+
t.ok(ber);
|
153
|
+
t.equal(ber.length, 26, 'wrong length');
|
154
|
+
t.equal(ber[0], 0x04, 'wrong tag');
|
155
|
+
t.equal(ber[1], 11, 'wrong length');
|
156
|
+
t.equal(ber.slice(2, 13).toString('utf8'), 'hello world', 'wrong value');
|
157
|
+
t.equal(ber[13], buf[0], 'wrong tag');
|
158
|
+
t.equal(ber[14], buf[1], 'wrong length');
|
159
|
+
for (var i = 13, j = 0; i < ber.length && j < buf.length; i++, j++) {
|
160
|
+
t.equal(ber[i], buf[j], 'buffer contents not identical');
|
161
|
+
}
|
162
|
+
t.end();
|
163
|
+
});
|
164
|
+
|
165
|
+
test('write string array', function(t) {
|
166
|
+
var writer = new BerWriter();
|
167
|
+
writer.writeStringArray(['hello world', 'fubar!']);
|
168
|
+
var ber = writer.buffer;
|
169
|
+
|
170
|
+
t.ok(ber);
|
171
|
+
|
172
|
+
t.equal(ber.length, 21, 'wrong length');
|
173
|
+
t.equal(ber[0], 0x04, 'wrong tag');
|
174
|
+
t.equal(ber[1], 11, 'wrong length');
|
175
|
+
t.equal(ber.slice(2, 13).toString('utf8'), 'hello world', 'wrong value');
|
176
|
+
|
177
|
+
t.equal(ber[13], 0x04, 'wrong tag');
|
178
|
+
t.equal(ber[14], 6, 'wrong length');
|
179
|
+
t.equal(ber.slice(15).toString('utf8'), 'fubar!', 'wrong value');
|
180
|
+
|
181
|
+
t.end();
|
182
|
+
});
|
183
|
+
|
184
|
+
|
185
|
+
test('resize internal buffer', function(t) {
|
186
|
+
var writer = new BerWriter({size: 2});
|
187
|
+
writer.writeString('hello world');
|
188
|
+
var ber = writer.buffer;
|
189
|
+
|
190
|
+
t.ok(ber);
|
191
|
+
t.equal(ber.length, 13, 'wrong length');
|
192
|
+
t.equal(ber[0], 0x04, 'wrong tag');
|
193
|
+
t.equal(ber[1], 11, 'wrong length');
|
194
|
+
t.equal(ber.slice(2).toString('utf8'), 'hello world', 'wrong value');
|
195
|
+
|
196
|
+
t.end();
|
197
|
+
});
|
198
|
+
|
199
|
+
|
200
|
+
test('sequence', function(t) {
|
201
|
+
var writer = new BerWriter({size: 25});
|
202
|
+
writer.startSequence();
|
203
|
+
writer.writeString('hello world');
|
204
|
+
writer.endSequence();
|
205
|
+
var ber = writer.buffer;
|
206
|
+
|
207
|
+
t.ok(ber);
|
208
|
+
console.log(ber);
|
209
|
+
t.equal(ber.length, 15, 'wrong length');
|
210
|
+
t.equal(ber[0], 0x30, 'wrong tag');
|
211
|
+
t.equal(ber[1], 13, 'wrong length');
|
212
|
+
t.equal(ber[2], 0x04, 'wrong tag');
|
213
|
+
t.equal(ber[3], 11, 'wrong length');
|
214
|
+
t.equal(ber.slice(4).toString('utf8'), 'hello world', 'wrong value');
|
215
|
+
|
216
|
+
t.end();
|
217
|
+
});
|
218
|
+
|
219
|
+
|
220
|
+
test('nested sequence', function(t) {
|
221
|
+
var writer = new BerWriter({size: 25});
|
222
|
+
writer.startSequence();
|
223
|
+
writer.writeString('hello world');
|
224
|
+
writer.startSequence();
|
225
|
+
writer.writeString('hello world');
|
226
|
+
writer.endSequence();
|
227
|
+
writer.endSequence();
|
228
|
+
var ber = writer.buffer;
|
229
|
+
|
230
|
+
t.ok(ber);
|
231
|
+
t.equal(ber.length, 30, 'wrong length');
|
232
|
+
t.equal(ber[0], 0x30, 'wrong tag');
|
233
|
+
t.equal(ber[1], 28, 'wrong length');
|
234
|
+
t.equal(ber[2], 0x04, 'wrong tag');
|
235
|
+
t.equal(ber[3], 11, 'wrong length');
|
236
|
+
t.equal(ber.slice(4, 15).toString('utf8'), 'hello world', 'wrong value');
|
237
|
+
t.equal(ber[15], 0x30, 'wrong tag');
|
238
|
+
t.equal(ber[16], 13, 'wrong length');
|
239
|
+
t.equal(ber[17], 0x04, 'wrong tag');
|
240
|
+
t.equal(ber[18], 11, 'wrong length');
|
241
|
+
t.equal(ber.slice(19, 30).toString('utf8'), 'hello world', 'wrong value');
|
242
|
+
|
243
|
+
t.end();
|
244
|
+
});
|
245
|
+
|
246
|
+
|
247
|
+
test('LDAP bind message', function(t) {
|
248
|
+
var dn = 'cn=foo,ou=unit,o=test';
|
249
|
+
var writer = new BerWriter();
|
250
|
+
writer.startSequence();
|
251
|
+
writer.writeInt(3); // msgid = 3
|
252
|
+
writer.startSequence(0x60); // ldap bind
|
253
|
+
writer.writeInt(3); // ldap v3
|
254
|
+
writer.writeString(dn);
|
255
|
+
writer.writeByte(0x80);
|
256
|
+
writer.writeByte(0x00);
|
257
|
+
writer.endSequence();
|
258
|
+
writer.endSequence();
|
259
|
+
var ber = writer.buffer;
|
260
|
+
|
261
|
+
t.ok(ber);
|
262
|
+
t.equal(ber.length, 35, 'wrong length (buffer)');
|
263
|
+
t.equal(ber[0], 0x30, 'wrong tag');
|
264
|
+
t.equal(ber[1], 33, 'wrong length');
|
265
|
+
t.equal(ber[2], 0x02, 'wrong tag');
|
266
|
+
t.equal(ber[3], 1, 'wrong length');
|
267
|
+
t.equal(ber[4], 0x03, 'wrong value');
|
268
|
+
t.equal(ber[5], 0x60, 'wrong tag');
|
269
|
+
t.equal(ber[6], 28, 'wrong length');
|
270
|
+
t.equal(ber[7], 0x02, 'wrong tag');
|
271
|
+
t.equal(ber[8], 1, 'wrong length');
|
272
|
+
t.equal(ber[9], 0x03, 'wrong value');
|
273
|
+
t.equal(ber[10], 0x04, 'wrong tag');
|
274
|
+
t.equal(ber[11], dn.length, 'wrong length');
|
275
|
+
t.equal(ber.slice(12, 33).toString('utf8'), dn, 'wrong value');
|
276
|
+
t.equal(ber[33], 0x80, 'wrong tag');
|
277
|
+
t.equal(ber[34], 0x00, 'wrong len');
|
278
|
+
|
279
|
+
t.end();
|
280
|
+
});
|
281
|
+
|
282
|
+
|
283
|
+
test('Write OID', function(t) {
|
284
|
+
var oid = '1.2.840.113549.1.1.1';
|
285
|
+
var writer = new BerWriter();
|
286
|
+
writer.writeOID(oid);
|
287
|
+
|
288
|
+
var ber = writer.buffer;
|
289
|
+
t.ok(ber);
|
290
|
+
console.log(require('util').inspect(ber));
|
291
|
+
console.log(require('util').inspect(new Buffer([0x06, 0x09, 0x2a, 0x86,
|
292
|
+
0x48, 0x86, 0xf7, 0x0d,
|
293
|
+
0x01, 0x01, 0x01])));
|
294
|
+
|
295
|
+
t.end();
|
296
|
+
});
|