def sign_dsa_asn1(self, digest): # type: (bytes) -> bytes assert self._check_key_type(), "'ec' type error" return m2.ecdsa_sign_asn1(self.ec, digest)