Example #1
0
    def _fixsig(self, cert):
        subject = 'CN=' + subject_from_certificate(cert)

        if subject in FIXSIG:  # Set unused bits in signature to 0
            der = list(cert.public_bytes(Encoding.DER))
            der[-257] = chr(0)
            cert = certificate_from_der(der)
        return cert
Example #2
0
    def _fixsig(self, cert):
        subject = 'CN=' + subject_from_certificate(cert)

        if subject in FIXSIG:  # Set unused bits in signature to 0
            der = cert.public_bytes(Encoding.DER)
            der = der[:-257] + b'\x00' + der[-256:]
            cert = certificate_from_der(der)
        return cert
Example #3
0
    def _fixsig(self, cert):
        subject = 'CN=' + subject_from_certificate(cert)

        if subject in FIXSIG:  # Set unused bits in signature to 0
            der = list(cert.public_bytes(Encoding.DER))
            der[-257] = b'\x00'
            cert = certificate_from_der(der)
        return cert