



@deftypefun {int} {gnutls_x509_crt_get_preferred_hash_algorithm} (gnutls_x509_crt_t @var{crt}, gnutls_digest_algorithm_t * @var{hash}, unsigned int * @var{mand})
@var{crt}: Holds the certificate

@var{hash}: The result of the call with the hash algorithm used for signature

@var{mand}: If non-zero it means that the algorithm MUST use this hash. May be @code{NULL} .

This function will read the certificate and return the appropriate digest
algorithm to use for signing with this certificate. Some certificates (i.e.
DSA might not be able to sign without the preferred algorithm).

@strong{Deprecated:} Please use @code{gnutls_pubkey_get_preferred_hash_algorithm()} .

@strong{Returns:} the 0 if the hash algorithm is found. A negative error code is
returned on error.

@strong{Since:} 2.12.0
@end deftypefun
