From: Nikos Mavrogiannopoulos Date: Sat, 15 Jan 2011 18:37:03 +0000 (+0100) Subject: deprecated gnutls_x509_crl_sign(), gnutls_x509_crl_sign2() and gnutls_x509_crq_get_pr... X-Git-Tag: gnutls_2_11_7~90 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7e2cbf896881816df86fcfef0ad10a45e60741b3;p=thirdparty%2Fgnutls.git deprecated gnutls_x509_crl_sign(), gnutls_x509_crl_sign2() and gnutls_x509_crq_get_preferred_hash_algorithm(). --- diff --git a/NEWS b/NEWS index f19ecb5184..773a4fc9f1 100644 --- a/NEWS +++ b/NEWS @@ -9,16 +9,24 @@ See the end for copying conditions. replaced by gnutls_privkey_sign_hash2(). ** libgnutls: gnutls_pubkey_verify_data, gnutls_pubkey_verify_hash, -gnutls_openpgp_crt_verify_hash, gnutls_x509_privkey_verify_data, -gnutls_x509_crt_verify_data, gnutls_x509_crt_verify_hash -return the negative error code GNUTLS_E_PK_SIG_VERIFY_FAILED -if verification fails to simplify error checking. +gnutls_x509_privkey_verify_data, gnutls_x509_crt_verify_data, +gnutls_x509_crt_verify_hash return the negative error code +GNUTLS_E_PK_SIG_VERIFY_FAILED if verification fails to simplify error +checking. ** libgnutls: Added helper functions for signature verification: gnutls_pubkey_verify_data() and gnutls_pubkey_import_privkey(). ** libgnutls: Added gnutls_privkey_sign_hash2(). +** gnutls_x509_crl_privkey_sign2(), gnutls_x509_crq_sign2() +gnutls_x509_privkey_sign_hash(), gnutls_x509_privkey_sign_data(), +gnutls_x509_crt_verify_hash(), gnutls_x509_crt_verify_data(), +were deprecated for gnutls_x509_crl_privkey_sign(), +gnutls_x509_crq_privkey_sign(), gnutls_privkey_sign_hash2(), +gnutls_privkey_sign_data2(), gnutls_pubkey_verify_hash() +gnutls_pubkey_verify_data() respectively. + ** libgnutls: gnutls_*_export_raw() functions now add leading zero in integers. @@ -30,18 +38,21 @@ gnutls_pubkey_import_privkey: ADDED gnutls_pubkey_verify_data: ADDED gnutls_privkey_sign_hash2: ADDED gnutls_privkey_sign_data2: ADDED (in place of gnutls_privkey_sign_data) -gnutls_x509_crq_sign2: DEPRECATED -gnutls_x509_crq_sign: DEPRECATED -gnutls_x509_privkey_sign_data: DEPRECATED -gnutls_x509_privkey_sign_hash: DEPRECATED -gnutls_x509_privkey_verify_data: DEPRECATED +gnutls_x509_crq_sign2: DEPRECATED (use: gnutls_x509_crq_privkey_sign) +gnutls_x509_crq_sign: DEPRECATED (use: gnutls_x509_crq_privkey_sign) +gnutls_x509_crq_get_preferred_hash_algorithm: DEPRECATED +gnutls_x509_crl_sign: DEPRECATED (use: gnutls_x509_crl_privkey_sign) +gnutls_x509_crl_sign2: DEPRECATED (use: gnutls_x509_crl_privkey_sign) +gnutls_x509_privkey_sign_data: DEPRECATED (use: gnutls_privkey_sign_data2) +gnutls_x509_privkey_sign_hash: DEPRECATED (use: gnutls_privkey_sign_hash2) +gnutls_x509_privkey_verify_data: DEPRECATED (use: gnutls_pubkey_verify_data) gnutls_psk_netconf_derive_key: DEPRECATED gnutls_session_set_finished_function: DEPRECATED gnutls_ext_register: DEPRECATED -gnutls_x509_crt_verify_hash: DEPRECATED -gnutls_x509_crt_verify_data: DEPRECATED -gnutls_x509_crt_get_verify_algorithm: DEPRECATED -gnutls_x509_crt_get_preferred_hash_algorithm: DEPRECATED +gnutls_x509_crt_verify_hash: DEPRECATED (use: gnutls_pubkey_verify_hash) +gnutls_x509_crt_verify_data: DEPRECATED (use: gnutls_pubkey_verify_data) +gnutls_x509_crt_get_verify_algorithm: DEPRECATED (use: gnutls_pubkey_get_verify_algorithm) +gnutls_x509_crt_get_preferred_hash_algorithm: DEPRECATED (use: gnutls_pubkey_get_preferred_hash_algorithm) gnutls_openpgp_privkey_sign_hash: REMOVED gnutls_openpgp_privkey_decrypt_data: REMOVED gnutls_pkcs11_privkey_sign_hash: REMOVED diff --git a/lib/includes/gnutls/compat.h b/lib/includes/gnutls/compat.h index f698af8ef0..30b2094a2f 100644 --- a/lib/includes/gnutls/compat.h +++ b/lib/includes/gnutls/compat.h @@ -271,6 +271,12 @@ gnutls_sign_callback_get (gnutls_session_t session, void **userdata) * hash, unsigned int *mand) _GNUTLS_GCC_ATTR_DEPRECATED; + + int gnutls_x509_crq_get_preferred_hash_algorithm (gnutls_x509_crq_t crq, + gnutls_digest_algorithm_t * hash, + unsigned int *mand) + _GNUTLS_GCC_ATTR_DEPRECATED; + /* gnutls_x509_crq_privkey_sign() */ int gnutls_x509_crq_sign2 (gnutls_x509_crq_t crq, gnutls_x509_privkey_t key, @@ -281,4 +287,17 @@ gnutls_sign_callback_get (gnutls_session_t session, void **userdata) _GNUTLS_GCC_ATTR_DEPRECATED; + /* gnutls_x509_crl_privkey_sign */ + int gnutls_x509_crl_sign (gnutls_x509_crl_t crl, + gnutls_x509_crt_t issuer, + gnutls_x509_privkey_t issuer_key) + _GNUTLS_GCC_ATTR_DEPRECATED; + int gnutls_x509_crl_sign2 (gnutls_x509_crl_t crl, + gnutls_x509_crt_t issuer, + gnutls_x509_privkey_t issuer_key, + gnutls_digest_algorithm_t dig, + unsigned int flags) + _GNUTLS_GCC_ATTR_DEPRECATED; + + #endif /* _GNUTLS_COMPAT_H */ diff --git a/lib/includes/gnutls/x509.h b/lib/includes/gnutls/x509.h index e6866ed540..9b42dcd05d 100644 --- a/lib/includes/gnutls/x509.h +++ b/lib/includes/gnutls/x509.h @@ -426,14 +426,6 @@ extern "C" */ int gnutls_x509_crl_set_version (gnutls_x509_crl_t crl, unsigned int version); - int gnutls_x509_crl_sign (gnutls_x509_crl_t crl, - gnutls_x509_crt_t issuer, - gnutls_x509_privkey_t issuer_key); - int gnutls_x509_crl_sign2 (gnutls_x509_crl_t crl, - gnutls_x509_crt_t issuer, - gnutls_x509_privkey_t issuer_key, - gnutls_digest_algorithm_t dig, - unsigned int flags); int gnutls_x509_crl_set_this_update (gnutls_x509_crl_t crl, time_t act_time); int gnutls_x509_crl_set_next_update (gnutls_x509_crl_t crl, @@ -718,10 +710,6 @@ extern "C" int gnutls_x509_crq_import (gnutls_x509_crq_t crq, const gnutls_datum_t * data, gnutls_x509_crt_fmt_t format); - int gnutls_x509_crq_get_preferred_hash_algorithm (gnutls_x509_crq_t crq, - gnutls_digest_algorithm_t - * hash, - unsigned int *mand); int gnutls_x509_crq_get_dn (gnutls_x509_crq_t crq, char *buf, size_t * sizeof_buf); @@ -829,3 +817,4 @@ extern "C" #endif #endif /* GNUTLS_X509_H */ + diff --git a/lib/x509/crl_write.c b/lib/x509/crl_write.c index 8d772dcba0..03c2e57dd4 100644 --- a/lib/x509/crl_write.c +++ b/lib/x509/crl_write.c @@ -92,6 +92,8 @@ gnutls_x509_crl_set_version (gnutls_x509_crl_t crl, unsigned int version) * This must be the last step in a certificate CRL since all * the previously set parameters are now signed. * + * Deprecated: Use gnutls_x509_crl_privkey_sign() instead. + * * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a * negative error value. **/ @@ -138,7 +140,7 @@ fail: return result; } -/** +/*- * gnutls_x509_crl_sign: * @crl: should contain a gnutls_x509_crl_t structure * @issuer: is the certificate of the certificate issuer @@ -149,7 +151,7 @@ fail: * * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a * negative error value. - **/ + -*/ int gnutls_x509_crl_sign (gnutls_x509_crl_t crl, gnutls_x509_crt_t issuer, gnutls_x509_privkey_t issuer_key)