Browse Source

response: include fingerprint in base64 format

master
nervuri 1 month ago
parent
commit
12e04710a9
  1. 3
      trust-seeker

3
trust-seeker

@ -106,7 +106,10 @@ def respond(response: str, status='success', mime_type: str = 'text/plain'):
if len(response) > 1:
formatted_response += os.linesep + 'number_of_pins=' + str(len(response))
for pin in response:
fp = pin['fingerprint'].split(':')[1]
base64_fingerprint = base64.b64encode(codecs.decode(fp, 'hex')).decode('ascii')
formatted_response += os.linesep + 'fingerprint=' + pin['fingerprint'] +\
os.linesep + 'fingerprint_base64=sha256:' + base64_fingerprint +\
os.linesep + 'expires=' + str(pin['expires']) +\
os.linesep + 'tls_version=' + str(pin['tls_version']) +\
os.linesep + 'cipher_suite=' + pin['cipher_suite'] +\

Loading…
Cancel
Save