Skip to content
Snippets Groups Projects
Unverified Commit 972aa3fd authored by Feanil Patel's avatar Feanil Patel Committed by GitHub
Browse files

Merge pull request #22567 from edx/feanil/fix_id_verification_errors

Ensure that photo verification data is correctly typed.
parents 0b7b62ae 3808b299
Branches
Tags
No related merge requests found
......@@ -31,7 +31,7 @@ class Command(BaseCommand):
dest='verification_ids',
action='store',
nargs='+',
type=int,
type=str,
help='verifications id used to retry verification'
)
......
......@@ -837,7 +837,7 @@ class SoftwareSecurePhotoVerification(PhotoVerification):
face_aes_key = codecs.decode(face_aes_key_str, 'hex')
rsa_key_str = settings.VERIFY_STUDENT["SOFTWARE_SECURE"]["RSA_PUBLIC_KEY"]
rsa_encrypted_face_aes_key = rsa_encrypt(face_aes_key, rsa_key_str)
return base64.b64encode(rsa_encrypted_face_aes_key)
return base64.b64encode(rsa_encrypted_face_aes_key).decode('utf-8')
def create_request(self, copy_id_photo_from=None):
"""
......
......@@ -176,7 +176,7 @@ def generate_signed_message(method, headers_dict, body_dict, access_key, secret_
# hmac needs a byte string for it's starting key, can't be unicode.
hashed = hmac.new(secret_key.encode('utf-8'), message.encode('utf-8'), sha256)
signature = binascii.b2a_base64(hashed.digest()).rstrip(b'\n')
signature = binascii.b2a_base64(hashed.digest()).rstrip(b'\n').decode('utf-8')
authorization_header = u"SSI {}:{}".format(access_key, signature)
message += '\n'
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment