jwk-to-pem
Advanced tools
Comparing version 1.2.4 to 1.2.5
{ | ||
"name": "jwk-to-pem", | ||
"version": "1.2.4", | ||
"version": "1.2.5", | ||
"description": "Convert a JSON Web Key to a PEM", | ||
@@ -29,15 +29,14 @@ "main": "src/jwk-to-pem.js", | ||
"dependencies": { | ||
"asn1.js": "^4.0.0", | ||
"asn1.js-rfc3280": "^4.0.0", | ||
"elliptic": "^6.0.1" | ||
"asn1.js": "^4.5.2", | ||
"elliptic": "^6.2.3" | ||
}, | ||
"devDependencies": { | ||
"chai": "^3.4.0", | ||
"coveralls": "^2.11.4", | ||
"eslint": "^1.10.3", | ||
"eslint-config-brightspace": "^0.1.0", | ||
"istanbul": "^0.4.0", | ||
"jwa": "^1.1.0", | ||
"mocha": "^2.3.3" | ||
"chai": "^3.5.0", | ||
"coveralls": "^2.11.9", | ||
"eslint": "^2.5.1", | ||
"eslint-config-brightspace": "^0.2.0", | ||
"istanbul": "^0.4.2", | ||
"jwa": "^1.1.3", | ||
"mocha": "^2.4.5" | ||
} | ||
} |
'use strict'; | ||
var asn1 = require('asn1.js'), | ||
EC = require('elliptic').ec, | ||
rfc3280 = require('asn1.js-rfc3280'); | ||
EC = require('elliptic').ec; | ||
@@ -105,3 +104,3 @@ var b64ToBn = require('./b64-to-bn'); | ||
} else { | ||
result = rfc3280.SubjectPublicKeyInfo.encode({ | ||
result = SubjectPublicKeyInfo.encode({ | ||
algorithm: { | ||
@@ -143,2 +142,16 @@ algorithm: [1, 2, 840, 10045, 2, 1], | ||
var AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', /* @this */ function() { | ||
this.seq().obj( | ||
this.key('algorithm').objid(), | ||
this.key('parameters').optional().any() | ||
); | ||
}); | ||
var SubjectPublicKeyInfo = asn1.define('SubjectPublicKeyInfo', /* @this */ function() { | ||
this.seq().obj( | ||
this.key('algorithm').use(AlgorithmIdentifier), | ||
this.key('subjectPublicKey').bitstr() | ||
); | ||
}); | ||
module.exports = ecJwkToBuffer; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20868
2
244
- Removedasn1.js-rfc3280@^4.0.0
- Removedasn1.js-rfc3280@4.0.0(transitive)
Updatedasn1.js@^4.5.2
Updatedelliptic@^6.2.3