Skip to content

Commit b9a1fe7

Browse files
authored
Merge pull request #55 from web-push-libs/vapid_update
Vapid update
2 parents ac99712 + 35fd0a2 commit b9a1fe7

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

pywebpush/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,13 +249,11 @@ def send(self, data=None, headers=None, ttl=0, gcm_key=None, reg_id=None,
249249
# use ';' instead of ',' to append the headers.
250250
# see https://github.com/webpush-wg/webpush-encryption/issues/6
251251
crypto_key += ';'
252-
crypto_key += (
253-
"keyid=p256dh;dh=" + encoded["crypto_key"].decode('utf8'))
252+
crypto_key += ("dh=" + encoded["crypto_key"].decode('utf8'))
254253
headers.update({
255254
'crypto-key': crypto_key,
256255
'content-encoding': content_encoding,
257-
'encryption': "keyid=p256dh;salt=" +
258-
encoded['salt'].decode('utf8'),
256+
'encryption': "salt=" + encoded['salt'].decode('utf8'),
259257
})
260258
if gcm_key:
261259
endpoint = 'https://android.googleapis.com/gcm/send'

pywebpush/tests/test_webpush.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def test_as_curl(self, opener):
265265
"-H \"crypto-key: p256ecdsa=",
266266
"-H \"content-encoding: aesgcm\"",
267267
"-H \"authorization: WebPush ",
268-
"-H \"encryption: keyid=p256dh;salt=",
268+
"-H \"encryption: salt=",
269269
"-H \"ttl: 0\"",
270270
"-H \"content-length:"
271271
]:

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
cryptography==1.8.1
22
http-ece==1.0.1
33
requests==2.13.0
4-
py-vapid==1.2.1
4+
py-vapid==1.2.2

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from setuptools import find_packages, setup
55

6-
__version__ = "1.0.0"
6+
__version__ = "1.0.1"
77

88

99
def read_from(file):

0 commit comments

Comments
 (0)