Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot encrypt with EC #3

Closed
msamblanet opened this issue Oct 6, 2015 · 0 comments
Closed

Cannot encrypt with EC #3

msamblanet opened this issue Oct 6, 2015 · 0 comments
Labels

Comments

@msamblanet
Copy link
Contributor

When I attempt to encrypt with a test EC key, the code fails at encrypt.js line 185 because algKey.keystore.temp is undefined. I see no other references to temp in the code based on a quick github search of the repo.

Trying to encrypt some test content using this test key (which was based on one of the node-jose unit tests)

{
    kty: "EC"
    kid: "testKey1"
    crv: "P-256"
    x: "uiOfViX69jYwnygrkPkuM0XqUlvW65WEs_7rgT3eaak"
    y: "v8S-ifVFkNLoe1TSUrNFQVj6jRbK1L8V-eZa-ngsZLM"
    d: "dI5TRpZrVLpTr_xxYK-n8FgTBpe5Uer-8QgHu5gx9Ds"
}

Exact error is:

TypeError: undefined is not a function
    at c:\oidc\jwk\node_modules\node-jose\lib\jwe\encrypt.js:185:35
    at c:\oidc\jwk\node_modules\node-jose\lib\jwe\encrypt.js:278:20
    at Array.map (native)
    at c:\oidc\jwk\node_modules\node-jose\lib\jwe\encrypt.js:277:25
linuxwolf added a commit that referenced this issue Oct 6, 2015
Bug: JWE encryption fails for ECDH keys (fix #3)
@linuxwolf linuxwolf added the bug label Oct 8, 2015
linuxwolf added a commit to linuxwolf/node-jose that referenced this issue Dec 10, 2015
linuxwolf added a commit to linuxwolf/node-jose that referenced this issue Dec 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants