Changeset 88


Ignore:
Timestamp:
03/09/16 17:59:49 (9 years ago)
Author:
tim
Message:

digest fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/bletchley/ssltls.py

    r87 r88  
    22Utilities for manipulating certificates and SSL/TLS connections.
    33
    4 Copyright (C) 2016 Blindspot Security LLC
     4Copyright (C) 2014,2016 Blindspot Security LLC
    55Author: Timothy D. Morgan
    66
     
    147147
    148148def getDigestAlgorithm(certificate):
    149     # XXX: ugly hack because pyopenssl API for this is limited
    150     if b'md5' in certificate.get_signature_algorithm():
    151         return 'md5'
    152     else:
    153         return 'sha1'
     149    # XXX: ugly hack because openssl API for this is limited
     150    algo = certificate.get_signature_algorithm()
     151    if b'With' in algo:
     152        return algo.split(b'With', 1)[0].decode('utf-8')
     153    return None
    154154
    155155
Note: See TracChangeset for help on using the changeset viewer.