0001-pwa-use-local-vapid-keys-even-if-python-cryptography.patch
combo/apps/pwa/views.py | ||
---|---|---|
47 | 47 |
template = get_template(template_name) |
48 | 48 |
pwa_vapid_public_key = None |
49 | 49 |
pwa_settings = PwaSettings.singleton() |
50 |
if pwa_settings.push_notifications and hasattr(serialization.Encoding, 'X962'):
|
|
50 |
if pwa_settings.push_notifications: |
|
51 | 51 |
if settings.PWA_VAPID_PUBLIK_KEY: # legacy |
52 | 52 |
pwa_vapid_public_key = settings.PWA_VAPID_PUBLIK_KEY |
53 |
else:
|
|
53 |
elif hasattr(serialization.Encoding, 'X962'):
|
|
54 | 54 |
pwa_vapid_public_key = force_text( |
55 | 55 |
base64.urlsafe_b64encode( |
56 | 56 |
Vapid.from_pem(pwa_settings.push_notifications_infos['private_key'].encode('ascii') |
57 |
- |