web-push-libs / vapid

Apps and Libraries to support WebPush VAPID
Mozilla Public License 2.0
90 stars 27 forks source link

Import private key #88

Closed lollita closed 3 years ago

lollita commented 3 years ago

JS library has a import_public_raw function. Do it is possible to import instead a private key to use in web push?

jrconlin commented 3 years ago

I'm not sure I understand what you're asking.

The Javascript library is more of an example. If I recall correctly, there are some limits with some implementations of WebCrypto which can prevent importing a private key (although the import_private_der() should read a DER encoded private key). I'll admit that I've not actually tried that and welcome patches that might address problems with the JS library. Likewise, it might be better to use a full node.js VAPID library.

My apologies, but I normally code in Python or Rust.

jrconlin commented 3 years ago

Closing as inactive.