feat(deps): upgrade to aegir@12 and browserify-aes@1.0.8

This commit is contained in:
Friedel Ziegelmayer 2017-09-05 15:28:43 +02:00 committed by GitHub
parent cb7fae7fcc
commit 83257bc4bd
22 changed files with 32 additions and 54 deletions

View File

@ -13,16 +13,11 @@ matrix:
script: script:
- npm run lint - npm run lint
- npm run test - npm run test
- npm run coverage
- make test
before_script: before_script:
- export DISPLAY=:99.0 - export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start - sh -e /etc/init.d/xvfb start
after_success:
- npm run coverage-publish
addons: addons:
firefox: 'latest' firefox: 'latest'
apt: apt:

View File

@ -22,5 +22,6 @@ curves.forEach((curve) => {
}, { defer: true }) }, { defer: true })
}) })
suite.on('cycle', (event) => console.log(String(event.target))) suite
.run({async: true}) .on('cycle', (event) => console.log(String(event.target)))
.run({async: true})

View File

@ -22,8 +22,9 @@ async.waterfall([
setup(cipher, hash, secret) setup(cipher, hash, secret)
})) }))
suite.on('cycle', (event) => console.log(String(event.target))) suite
.run({async: true}) .on('cycle', (event) => console.log(String(event.target)))
.run({async: true})
}) })
function setup (cipher, hash, secret) { function setup (cipher, hash, secret) {

View File

@ -37,5 +37,6 @@ suite.add('sign and verify', (d) => {
defer: true defer: true
}) })
suite.on('cycle', (event) => console.log(String(event.target))) suite
.run({async: true}) .on('cycle', (event) => console.log(String(event.target)))
.run({async: true})

View File

@ -2,6 +2,10 @@ machine:
node: node:
version: stable version: stable
post:
test:
- npm run coverage -- --upload
dependencies: dependencies:
pre: pre:
- google-chrome --version - google-chrome --version

View File

@ -10,17 +10,16 @@
"./src/keys/rsa.js": "./src/keys/rsa-browser.js" "./src/keys/rsa.js": "./src/keys/rsa-browser.js"
}, },
"scripts": { "scripts": {
"lint": "aegir-lint", "lint": "aegir lint",
"build": "aegir-build", "build": "aegir build",
"build-proto": "pbjs --wrap commonjs --target static-module src/keys/keys.proto > src/keys/keys.proto.js", "build-proto": "pbjs --wrap commonjs --target static-module src/keys/keys.proto > src/keys/keys.proto.js",
"test": "aegir-test", "test": "aegir test",
"test:node": "aegir-test --env node", "test:node": "aegir test -t node",
"test:browser": "aegir-test --env browser", "test:browser": "aegir test -t browser -t webworker",
"release": "aegir-release", "release": "aegir release",
"release-minor": "aegir-release --type minor", "release-minor": "aegir release --type minor",
"release-major": "aegir-release --type major", "release-major": "aegir release --type major",
"coverage": "aegir-coverage", "coverage": "aegir coverage --ignore src/keys/keys.proto.js"
"coverage-publish": "aegir-coverage publish"
}, },
"keywords": [ "keywords": [
"IPFS", "IPFS",
@ -33,19 +32,18 @@
"dependencies": { "dependencies": {
"asn1.js": "^4.9.1", "asn1.js": "^4.9.1",
"async": "^2.5.0", "async": "^2.5.0",
"browserify-aes": "^1.0.6", "browserify-aes": "^1.0.8",
"keypair": "^1.0.1", "keypair": "^1.0.1",
"libp2p-crypto-secp256k1": "~0.2.2", "libp2p-crypto-secp256k1": "~0.2.2",
"multihashing-async": "~0.4.6", "multihashing-async": "~0.4.6",
"pem-jwk": "^1.5.1", "pem-jwk": "^1.5.1",
"protobufjs": "^6.8.0", "protobufjs": "^6.8.0",
"rsa-pem-to-jwk": "^1.1.3", "rsa-pem-to-jwk": "^1.1.3",
"safe-buffer": "^5.1.1",
"tweetnacl": "^1.0.0", "tweetnacl": "^1.0.0",
"webcrypto-shim": "github:dignifiedquire/webcrypto-shim#master" "webcrypto-shim": "github:dignifiedquire/webcrypto-shim#master"
}, },
"devDependencies": { "devDependencies": {
"aegir": "^11.0.2", "aegir": "^12.0.5",
"benchmark": "^2.1.4", "benchmark": "^2.1.4",
"chai": "^4.1.2", "chai": "^4.1.2",
"dirty-chai": "^2.0.1", "dirty-chai": "^2.0.1",
@ -79,4 +77,4 @@
"greenkeeper[bot] <greenkeeper[bot]@users.noreply.github.com>", "greenkeeper[bot] <greenkeeper[bot]@users.noreply.github.com>",
"nikuda <nikuda@gmail.com>" "nikuda <nikuda@gmail.com>"
] ]
} }

View File

@ -1,7 +1,6 @@
'use strict' 'use strict'
const nodeify = require('../nodeify') const nodeify = require('../nodeify')
const Buffer = require('safe-buffer').Buffer
const crypto = require('../webcrypto.js')() const crypto = require('../webcrypto.js')()
const lengths = require('./lengths') const lengths = require('./lengths')

View File

@ -3,7 +3,6 @@
const webcrypto = require('../webcrypto.js')() const webcrypto = require('../webcrypto.js')()
const nodeify = require('../nodeify') const nodeify = require('../nodeify')
const BN = require('asn1.js').bignum const BN = require('asn1.js').bignum
const Buffer = require('safe-buffer').Buffer
const util = require('../util') const util = require('../util')
const toBase64 = util.toBase64 const toBase64 = util.toBase64

View File

@ -1,7 +1,6 @@
'use strict' 'use strict'
const multihashing = require('multihashing-async') const multihashing = require('multihashing-async')
const Buffer = require('safe-buffer').Buffer
const crypto = require('./ed25519') const crypto = require('./ed25519')
const pbm = require('./keys.proto.js') const pbm = require('./keys.proto.js')

View File

@ -2,7 +2,6 @@
const nacl = require('tweetnacl') const nacl = require('tweetnacl')
const setImmediate = require('async/setImmediate') const setImmediate = require('async/setImmediate')
const Buffer = require('safe-buffer').Buffer
exports.publicKeyLength = nacl.sign.publicKeyLength exports.publicKeyLength = nacl.sign.publicKeyLength
exports.privateKeyLength = nacl.sign.secretKeyLength exports.privateKeyLength = nacl.sign.secretKeyLength

View File

@ -1,7 +1,6 @@
'use strict' 'use strict'
const whilst = require('async/whilst') const whilst = require('async/whilst')
const Buffer = require('safe-buffer').Buffer
const hmac = require('../hmac') const hmac = require('../hmac')
const cipherMap = { const cipherMap = {

View File

@ -1,7 +1,6 @@
'use strict' 'use strict'
const nodeify = require('../nodeify') const nodeify = require('../nodeify')
const Buffer = require('safe-buffer').Buffer
const webcrypto = require('../webcrypto.js')() const webcrypto = require('../webcrypto.js')()
@ -18,11 +17,11 @@ exports.generateKey = function (bits, callback) {
true, true,
['sign', 'verify'] ['sign', 'verify']
) )
.then(exportKey) .then(exportKey)
.then((keys) => ({ .then((keys) => ({
privateKey: keys[0], privateKey: keys[0],
publicKey: keys[1] publicKey: keys[1]
})), callback) })), callback)
} }
// Takes a jwk key // Takes a jwk key

View File

@ -1,7 +1,6 @@
'use strict' 'use strict'
const BN = require('asn1.js').bignum const BN = require('asn1.js').bignum
const Buffer = require('safe-buffer').Buffer
// Convert a BN.js instance to a base64 encoded string without padding // Convert a BN.js instance to a base64 encoded string without padding
// Adapted from https://tools.ietf.org/html/draft-ietf-jose-json-web-signature-41#appendix-C // Adapted from https://tools.ietf.org/html/draft-ietf-jose-json-web-signature-41#appendix-C
@ -11,8 +10,8 @@ exports.toBase64 = function toBase64 (bn, len) {
return s return s
.replace(/(=*)$/, '') // Remove any trailing '='s .replace(/(=*)$/, '') // Remove any trailing '='s
.replace(/\+/g, '-') // 62nd char of encoding .replace(/\+/g, '-') // 62nd char of encoding
.replace(/\//g, '_') // 63rd char of encoding .replace(/\//g, '_') // 63rd char of encoding
} }
// Convert a base64 encoded string to a BN.js instance // Convert a base64 encoded string to a BN.js instance

View File

@ -7,7 +7,6 @@ const dirtyChai = require('dirty-chai')
const expect = chai.expect const expect = chai.expect
chai.use(dirtyChai) chai.use(dirtyChai)
const series = require('async/series') const series = require('async/series')
const Buffer = require('safe-buffer').Buffer
const crypto = require('../../src') const crypto = require('../../src')
const fixtures = require('./../fixtures/aes') const fixtures = require('./../fixtures/aes')

View File

@ -1,7 +1,5 @@
'use strict' 'use strict'
const Buffer = require('safe-buffer').Buffer
module.exports = { module.exports = {
curve: 'P-256', curve: 'P-256',
bob: { bob: {

View File

@ -1,7 +1,5 @@
'use strict' 'use strict'
const Buffer = require('safe-buffer').Buffer
module.exports = { module.exports = {
// These were generated in a gore (https://github.com/motemen/gore) repl session: // These were generated in a gore (https://github.com/motemen/gore) repl session:
// //

View File

@ -1,7 +1,5 @@
'use strict' 'use strict'
const Buffer = require('safe-buffer').Buffer
module.exports = { module.exports = {
private: { private: {
hash: Buffer.from([ hash: Buffer.from([

View File

@ -1,7 +1,5 @@
'use strict' 'use strict'
const Buffer = require('safe-buffer').Buffer
module.exports = [{ module.exports = [{
cipher: 'AES-256', cipher: 'AES-256',
hash: 'SHA256', hash: 'SHA256',

View File

@ -1,9 +1,6 @@
'use strict' 'use strict'
const Buffer = require('safe-buffer').Buffer
module.exports = { module.exports = {
// protobuf marshaled key pair generated with libp2p-crypto-secp256k1 // protobuf marshaled key pair generated with libp2p-crypto-secp256k1
// and marshaled with libp2p-crypto.marshalPublicKey / marshalPrivateKey // and marshaled with libp2p-crypto.marshalPublicKey / marshalPrivateKey
pbmPrivateKey: Buffer.from('08021220e0600103010000000100000000000000be1dc82c2e000000e8d6030301000000', 'hex'), pbmPrivateKey: Buffer.from('08021220e0600103010000000100000000000000be1dc82c2e000000e8d6030301000000', 'hex'),

View File

@ -2,7 +2,6 @@
/* eslint-env mocha */ /* eslint-env mocha */
'use strict' 'use strict'
const Buffer = require('safe-buffer').Buffer
const chai = require('chai') const chai = require('chai')
const dirtyChai = require('dirty-chai') const dirtyChai = require('dirty-chai')
const expect = chai.expect const expect = chai.expect

View File

@ -5,7 +5,6 @@ const chai = require('chai')
const dirtyChai = require('dirty-chai') const dirtyChai = require('dirty-chai')
const expect = chai.expect const expect = chai.expect
chai.use(dirtyChai) chai.use(dirtyChai)
const Buffer = require('safe-buffer').Buffer
const crypto = require('../../src') const crypto = require('../../src')
const ed25519 = crypto.keys.supportedKeys.ed25519 const ed25519 = crypto.keys.supportedKeys.ed25519

View File

@ -5,7 +5,6 @@ const chai = require('chai')
const dirtyChai = require('dirty-chai') const dirtyChai = require('dirty-chai')
const expect = chai.expect const expect = chai.expect
chai.use(dirtyChai) chai.use(dirtyChai)
const Buffer = require('safe-buffer').Buffer
const crypto = require('../../src') const crypto = require('../../src')
const rsa = crypto.keys.supportedKeys.rsa const rsa = crypto.keys.supportedKeys.rsa