web-push-libs / vapid

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

CryptographyDeprecationWarning with a seemingly simple fix #105

Open vahp opened 6 months ago

vahp commented 6 months ago

getting this straightforward-looking warning when running vapid

$ vapid --gen /Users/me/myproject/venv/lib/python3.11/site-packages/py_vapid/init.py:200: CryptographyDeprecationWarning: Curve argument must be an instance of an EllipticCurve class. Did you pass a class by mistake? This will be an exception in a future version of cryptography. self.private_key = ec.generate_private_key(ec.SECP256R1, default_backend())

it seems to me that you can fix it with with a pair of parens : ec.SECP256R1() I'm leery of messing with other people's security code so just opening this as an issue.

jrconlin commented 6 months ago

Sigh.

The fun of dependent library changes...