File tree Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 22from cryptography .hazmat .primitives import hashes
33from cryptography .hazmat .backends import default_backend
44from cryptography .exceptions import InvalidKey , InvalidTag
5- from ed25519 import BadSignatureError
5+
6+
7+ from nacl .signing import VerifyKey
8+ from nacl .encoding import HexEncoder
9+ from nacl .exceptions import BadSignatureError
10+
611import argparse
7- import ed25519
12+ # import ed25519
813import base64
914import json
1015import sys
4651 sys .exit (1 )
4752
4853# Verify using Ed25519
54+ # exit()
4955try :
50- verify_key = ed25519 .VerifyingKey (
51- os .environ ['KEYGEN_PUBLIC_KEY' ].encode (),
52- encoding = 'hex' ,
56+ verify_key = VerifyKey (
57+ bytes .fromhex (os .environ ['KEYGEN_PUBLIC_KEY' ])
5358 )
5459
60+ print ("GETTING ALONG" )
5561 verify_key .verify (
56- base64 .b64decode (sig ),
5762 ('license/%s' % enc ).encode (),
63+ base64 .b64decode (sig ),
5864 )
5965except (AssertionError , BadSignatureError ):
6066 print ('[error] verification failed!' )
Original file line number Diff line number Diff line change 11argparse
22cryptography
3- ed25519
3+ #ed25519
4+ pynacl
You can’t perform that action at this time.
0 commit comments