Skip to content

Commit 2ef1aa1

Browse files
committed
feat: Update to cryptography 2.0.3
Closes #75
1 parent 66986c1 commit 2ef1aa1

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

README.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ object.
121121

122122
The following methods are available:
123123

124-
``.send(data, headers={}, ttl=0, gcm_key="", reg_id="", content_encoding="aesgcm", curl=False)``
125-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
124+
``.send(data, headers={}, ttl=0, gcm_key="", reg_id="", content_encoding="aesgcm", curl=False, timeout=None)``
125+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
126126

127127
Send the data using additional parameters. On error, returns a
128128
``WebPushException``
@@ -149,6 +149,9 @@ will write the encrypted content to a local file named
149149
``encrpypted.data``. This command is meant to be used for debugging
150150
purposes.
151151

152+
*timeout* timeout for requests POST query. See `requests
153+
documentation <http://docs.python-requests.org/en/master/user/quickstart/#timeouts>`__.
154+
152155
**Example**
153156

154157
to send from Chrome using the old GCM mode:

pywebpush/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ def webpush(subscription_info,
353353
vv = Vapid.from_file(
354354
private_key_file=vapid_private_key) # pragma no cover
355355
else:
356-
vv = Vapid.from_raw(private_raw=vapid_private_key.encode())
356+
vv = Vapid.from_der(private_key=vapid_private_key.encode())
357357
vapid_headers = vv.sign(vapid_claims)
358358
result = WebPusher(subscription_info).send(
359359
data,

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cryptography>=1.8.1,<1.10
1+
cryptography>=1.8.1,<=2.3.0
22
http-ece>=1.0.1
33
requests>=2.13.0
4-
py-vapid>=1.2.5
4+
py-vapid>=1.3.0

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.1.0"
6+
__version__ = "1.2.0"
77

88

99
def read_from(file):

0 commit comments

Comments
 (0)