'Retrieve the signature algorithm used in the certificate
:return: A byte string giving the name of the signature algorithm used in
the certificate.
:raise ValueError: If the signature algorithm is undefined.'

def get_signature_algorithm(self):

    alg = self._x509.cert_info.signature.algorithm
    nid = _lib.OBJ_obj2nid(alg)
    if (nid == _lib.NID_undef):
        raise ValueError('Undefined    signature    algorithm')
    return _ffi.string(_lib.OBJ_nid2ln(nid))
