Comments (4)
Hrm,
On my system, your private key is invalid. If that was generated by vapid, I'm not sure why it made an invalid key, but you can also create one by using openssl directly:
openssl ecparam -genkey -name prime256v1 -noout -out private_key.pem
I'm also not sure why you're seeing theincorrect padding
error. I tried the application string and it worked fine.Thanks, I'll try again as you say.
Thanks, finally without generating the keys through the vapid library I got it to work.
I found these commands that I think could be useful for people who want to work with DER (bas64), I'll leave it here:
openssl ecparam -genkey -name prime256v1 -noout -out private_key.pem
openssl ec -in private_key.pem -pubout -outform DER|tail -c 65|base64|tr -d '=' |tr '/+' '-' >> public.key
openssl ec -in private_key.pem -outform DER|tail -c +8|head -c 32|base64|tr -d '=' |tr '/+' '-' >> private. key
Thank @jrconlin
from pywebpush.
@jrconlin any ideas what I may be doing wrong? I am blocked and the only solution I would have would be to integrate in node that I have seen that I have no problem.
from pywebpush.
Hrm,
On my system, your private key is invalid. If that was generated by vapid, I'm not sure why it made an invalid key, but you can also create one by using openssl directly:
openssl ecparam -genkey -name prime256v1 -noout -out private_key.pem
I'm also not sure why you're seeing the incorrect padding
error. I tried the application string and it worked fine.
from pywebpush.
Hrm,
On my system, your private key is invalid. If that was generated by vapid, I'm not sure why it made an invalid key, but you can also create one by using openssl directly:
openssl ecparam -genkey -name prime256v1 -noout -out private_key.pem
I'm also not sure why you're seeing the
incorrect padding
error. I tried the application string and it worked fine.
Thanks, I'll try again as you say.
from pywebpush.
Related Issues (20)
- Send Push to Offline Devices (When it comes Online) HOT 7
- Feature: get the encoded data ready for sending (for async interop) HOT 1
- Error : Web push send from python backend to fire base using VAPI keys. Unhashable type:'slice' HOT 7
- use unittest.mock instead of mock
- JWT token being refreshed too often HOT 8
- Async Send Function HOT 1
- Unauthorized error while sending notifications to edge device
- Is the library being maintained HOT 2
- Grouping of multiple notification not working
- Defination of payload HOT 1
- netrc may override authorization header.
- How to set the `aud` for localhost HOT 2
- CryptographyDeprecationWarning: Curve Argument Type Issue in pywebpush
- For edge, I only get 400 Bad Request. I tested it in webpush library for node. It works properly. HOT 4
- 400 Bad Request when using Windows Push Notification Services (WNS) endpoint HOT 8
- Is there a way to set topic for replacing old messages? HOT 1
- No error thrown, but no push notifications received HOT 2
- Drop six usage
- Use classifier for license in pyproject.toml
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pywebpush.