size_t * signature_size)
_GNUTLS_GCC_ATTR_DEPRECATED;
- /* gnutls_pubkey_get_verify_algorithm() */
-int gnutls_x509_crt_get_verify_algorithm(gnutls_x509_crt_t crt,
- const gnutls_datum_t *
- signature,
- gnutls_digest_algorithm_t
- * hash)
- _GNUTLS_GCC_ATTR_DEPRECATED;
-
/* gnutls_pubkey_get_preferred_hash_algorithm() */
int gnutls_x509_crt_get_preferred_hash_algorithm(gnutls_x509_crt_t
crt,
gnutls_x509_crq_set_key_purpose_oid;
gnutls_x509_crq_set_key_usage;
gnutls_x509_crq_set_subject_alt_name;
- gnutls_x509_crt_get_verify_algorithm;
gnutls_x509_crt_set_crq_extensions;
gnutls_session_ticket_key_generate;
gnutls_session_ticket_enable_client;
crl_list_length, NULL);
}
-/**
- * gnutls_x509_crt_get_verify_algorithm:
- * @crt: Holds the certificate
- * @signature: contains the signature
- * @hash: The result of the call with the hash algorithm used for signature
- *
- * This function will read the certifcate and the signed data to
- * determine the hash algorithm used to generate the signature.
- *
- * Deprecated: Use gnutls_pubkey_get_verify_algorithm() instead.
- *
- * Returns: the 0 if the hash algorithm is found. A negative error code is
- * returned on error.
- *
- * Since: 2.8.0
- **/
-int
-gnutls_x509_crt_get_verify_algorithm(gnutls_x509_crt_t crt,
- const gnutls_datum_t * signature,
- gnutls_digest_algorithm_t * hash)
-{
- gnutls_pk_params_st issuer_params;
- int ret;
-
- if (crt == NULL) {
- gnutls_assert();
- return GNUTLS_E_INVALID_REQUEST;
- }
-
- ret = _gnutls_x509_crt_get_mpis(crt, &issuer_params);
- if (ret < 0) {
- gnutls_assert();
- return ret;
- }
-
- ret = _gnutls_x509_verify_algorithm(hash,
- signature,
- gnutls_x509_crt_get_pk_algorithm
- (crt, NULL), &issuer_params);
-
- /* release allocated mpis */
- gnutls_pk_params_release(&issuer_params);
-
- return ret;
-}
-
-
-
/**
* gnutls_x509_crt_get_preferred_hash_algorithm:
* @crt: Holds the certificate