fingerprint.py 388 B

12345678910111213
  1. from argparse import ArgumentParser
  2. from openleadr.utils import certificate_fingerprint
  3. def show_fingerprint():
  4. parser = ArgumentParser()
  5. parser.add_argument('certificate', type=str)
  6. args = parser.parse_args()
  7. if 'certificate' in args:
  8. with open(args.certificate) as file:
  9. cert_str = file.read()
  10. print(certificate_fingerprint(cert_str))