From c05a8e65dc9a40cf6677d8dcac1b1609b412ff82 Mon Sep 17 00:00:00 2001 From: 3wc <3wc.git@doesthisthing.work> Date: Wed, 7 Apr 2021 16:26:13 +0200 Subject: [PATCH] Fix gen_vapid_keys --- .../management/commands/gen_vapid_keys.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/djangoldp_webpushnotification/management/commands/gen_vapid_keys.py b/djangoldp_webpushnotification/management/commands/gen_vapid_keys.py index 10a2ee2..2396574 100644 --- a/djangoldp_webpushnotification/management/commands/gen_vapid_keys.py +++ b/djangoldp_webpushnotification/management/commands/gen_vapid_keys.py @@ -3,7 +3,7 @@ from ecdsa import SigningKey from base64 import urlsafe_b64encode from django.core.management.base import BaseCommand -from djangoldp_notification.models import VAPIDKeyset +from djangoldp_webpushnotification.models import VAPIDKeyset class Command(BaseCommand): @@ -13,11 +13,11 @@ class Command(BaseCommand): priv_key = SigningKey.generate(curve=ecdsa.NIST256p) pub_key = priv_key.get_verifying_key() - VAPIDKeyset.objects.create( - public_key=urlsafe_b64encode(b"\x04" + pub_key.to_string()).strip(b"="), - private_key=urlsafe_b64encode(priv_key.to_string()).strip(b"=") - ) + VAPIDKeyset.objects.create( + public_key=urlsafe_b64encode(b"\x04" + pub_key.to_string()).strip(b"="), + private_key=urlsafe_b64encode(priv_key.to_string()).strip(b"=") + ) - self.stdout.write("VAPID Keyset succesfully generated") + self.stdout.write("VAPID Keyset succesfully generated") - exit(0) \ No newline at end of file + exit(0)