panva / paseto

PASETO (Platform-Agnostic SEcurity TOkens) for Node.js with no dependencies
MIT License
428 stars 26 forks source link

At paseto/lib/v1/sign.js #39

Closed shy-Xu closed 1 year ago

shy-Xu commented 1 year ago

What happened?

I've got a bug

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'RSA_PKCS1_PSS_PADDING')
    at node_modules/paseto/lib/v1/sign.js (sign.js:3:28)
    at __require2 (chunk-CLUHM6AE.js?v=ffcba462:19:50)
    at node_modules/paseto/lib/v1/index.js (index.js:1:14)
    at __require2 (chunk-CLUHM6AE.js?v=ffcba462:19:50)
    at node_modules/paseto/lib/index.js (index.js:2:12)

Version

v3.1.2

Node.js Version

v16.0.4

Code to reproduce

Just a simple demo, I wonder if it's due to my local environment

Required

panva commented 1 year ago

I wonder if it's due to my local environment

Sure is. RSA_PKCS1_PSS_PADDING is an openssl constant exposed in every supported Node.js version's crypto module.