Socket
Socket
Sign inDemoInstall

jose

Package Overview
Dependencies
Maintainers
1
Versions
209
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jose - npm Package Compare versions

Comparing version 1.27.1 to 1.27.2

9

CHANGELOG.md

@@ -5,2 +5,11 @@ # Change Log

## [1.27.2](https://github.com/panva/jose/compare/v1.27.1...v1.27.2) (2020-07-01)
### Bug Fixes
* handle private EC keys without public component ([#86](https://github.com/panva/jose/issues/86)) ([e8ad389](https://github.com/panva/jose/commit/e8ad38993e29747098f7fd1594dde4ce893ba802)), closes [#85](https://github.com/panva/jose/issues/85)
## [1.27.1](https://github.com/panva/jose/compare/v1.27.0...v1.27.1) (2020-06-01)

@@ -7,0 +16,0 @@

18

lib/help/key_utils.js

@@ -7,2 +7,3 @@ /* global BigInt */

const { keyObjectSupported } = require('./runtime_support')
const { createPublicKey } = require('./key_object')

@@ -93,7 +94,18 @@ const base64url = require('./base64url')

const { privateKey, algorithm: { parameters: { value: crv } } } = PrivateKeyInfo.decode(der)
const { privateKey: d, publicKey: { data: publicKey } } = ECPrivateKey.decode(privateKey)
const { privateKey: d, publicKey } = ECPrivateKey.decode(privateKey)
const x = publicKey.slice(1, ((publicKey.length - 1) / 2) + 1)
const y = publicKey.slice(((publicKey.length - 1) / 2) + 1)
if (typeof publicKey === 'undefined') {
if (keyObjectSupported) {
return {
...keyObjectToJWK.ec.public(createPublicKey(keyObject)),
d: base64url.encodeBuffer(d)
}
}
throw new errors.JOSENotSupported('Private EC keys without the public key embedded are not supported in your Node.js runtime version')
}
const x = publicKey.data.slice(1, ((publicKey.data.length - 1) / 2) + 1)
const y = publicKey.data.slice(((publicKey.data.length - 1) / 2) + 1)
return {

@@ -100,0 +112,0 @@ kty: 'EC',

2

package.json
{
"name": "jose",
"version": "1.27.1",
"version": "1.27.2",
"description": "JSON Web Almost Everything - JWA, JWS, JWE, JWK, JWT, JWKS for Node.js with minimal dependencies",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc