Merge pull request #55 from web-push-libs/vapid_update

Vapid update
This commit is contained in:
JR Conlin 2017-05-15 09:27:22 -07:00 committed by GitHub
commit 5e8ff2bb29
4 changed files with 5 additions and 7 deletions

View File

@ -249,13 +249,11 @@ class WebPusher:
# use ';' instead of ',' to append the headers.
# see https://github.com/webpush-wg/webpush-encryption/issues/6
crypto_key += ';'
crypto_key += (
"keyid=p256dh;dh=" + encoded["crypto_key"].decode('utf8'))
crypto_key += ("dh=" + encoded["crypto_key"].decode('utf8'))
headers.update({
'crypto-key': crypto_key,
'content-encoding': content_encoding,
'encryption': "keyid=p256dh;salt=" +
encoded['salt'].decode('utf8'),
'encryption': "salt=" + encoded['salt'].decode('utf8'),
})
if gcm_key:
endpoint = 'https://android.googleapis.com/gcm/send'

View File

@ -265,7 +265,7 @@ class WebpushTestCase(unittest.TestCase):
"-H \"crypto-key: p256ecdsa=",
"-H \"content-encoding: aesgcm\"",
"-H \"authorization: WebPush ",
"-H \"encryption: keyid=p256dh;salt=",
"-H \"encryption: salt=",
"-H \"ttl: 0\"",
"-H \"content-length:"
]:

View File

@ -1,4 +1,4 @@
cryptography==1.8.1
http-ece==1.0.1
requests==2.13.0
py-vapid==1.2.1
py-vapid==1.2.2

View File

@ -3,7 +3,7 @@ import os
from setuptools import find_packages, setup
__version__ = "1.0.0"
__version__ = "1.0.1"
def read_from(file):