From: Nikos Mavrogiannopoulos Date: Wed, 18 Mar 2015 09:09:34 +0000 (+0100) Subject: removed unused functions X-Git-Tag: gnutls_3_4_0~184 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3862a97af5ebefa656aa738af37f443ad86f8a3e;p=thirdparty%2Fgnutls.git removed unused functions --- diff --git a/lib/crypto-backend.c b/lib/crypto-backend.c index 2132b5334e..17f3dd03c8 100644 --- a/lib/crypto-backend.c +++ b/lib/crypto-backend.c @@ -342,100 +342,3 @@ int gnutls_crypto_pk_register(int priority, const gnutls_crypto_pk_st * s) return GNUTLS_E_CRYPTO_ALREADY_REGISTERED; } -/*- - * gnutls_crypto_cipher_register: - * @priority: is the priority of the cipher interface - * @s: is a structure holding new interface's data - * - * This function will register a cipher interface to be used by - * gnutls. Any interface registered will override the included engine - * and by convention kernel implemented interfaces should have - * priority of 90 and CPU-assisted of 80. The interface with the lowest priority will be used - * by gnutls. - * - * This function should be called before gnutls_global_init(). - * - * For simplicity you can use the convenience - * gnutls_crypto_cipher_register() macro. - * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. - * - * Since: 2.6.0 - -*/ -int -gnutls_crypto_cipher_register(int priority, - const gnutls_crypto_cipher_st * s) -{ - if (crypto_cipher_prio > priority) { - memcpy(&_gnutls_cipher_ops, s, sizeof(*s)); - crypto_cipher_prio = priority; - return 0; - } - - return GNUTLS_E_CRYPTO_ALREADY_REGISTERED; -} - -/*- - * gnutls_crypto_mac_register: - * @priority: is the priority of the mac interface - * @s: is a structure holding new interface's data - * - * This function will register a mac interface to be used by - * gnutls. Any interface registered will override the included engine - * and by convention kernel implemented interfaces should have - * priority of 90 and CPU-assisted of 80. The interface with the lowest priority will be used - * by gnutls. - * - * This function should be called before gnutls_global_init(). - * - * For simplicity you can use the convenience - * gnutls_crypto_digest_register() macro. - * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. - * - * Since: 2.6.0 - -*/ -int -gnutls_crypto_mac_register(int priority, const gnutls_crypto_mac_st * s) -{ - if (crypto_mac_prio > priority) { - memcpy(&_gnutls_mac_ops, s, sizeof(*s)); - crypto_mac_prio = priority; - return 0; - } - - return GNUTLS_E_CRYPTO_ALREADY_REGISTERED; -} - -/*- - * gnutls_crypto_digest_register: - * @priority: is the priority of the digest interface - * @s: is a structure holding new interface's data - * - * This function will register a digest interface to be used by - * gnutls. Any interface registered will override the included engine - * and by convention kernel implemented interfaces should have - * priority of 90 and CPU-assisted of 80. The interface with the lowest priority will be used - * by gnutls. - * - * This function should be called before gnutls_global_init(). - * - * For simplicity you can use the convenience - * gnutls_crypto_digest_register() macro. - * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. - * - * Since: 2.6.0 - -*/ -int -gnutls_crypto_digest_register(int priority, - const gnutls_crypto_digest_st * s) -{ - if (crypto_digest_prio > priority) { - memcpy(&_gnutls_digest_ops, s, sizeof(*s)); - crypto_digest_prio = priority; - return 0; - } - - return GNUTLS_E_CRYPTO_ALREADY_REGISTERED; -} diff --git a/lib/crypto-backend.h b/lib/crypto-backend.h index 09aa93c87f..e2f0c0325b 100644 --- a/lib/crypto-backend.h +++ b/lib/crypto-backend.h @@ -366,13 +366,6 @@ int gnutls_crypto_single_digest_register(gnutls_digest_algorithm_t gnutls_crypto_single_digest_st * s); -int gnutls_crypto_cipher_register(int priority, - const gnutls_crypto_cipher_st * s); -int gnutls_crypto_mac_register(int priority, - const gnutls_crypto_mac_st * s); -int gnutls_crypto_digest_register(int priority, - const gnutls_crypto_digest_st * s); - int gnutls_crypto_rnd_register(int priority, const gnutls_crypto_rnd_st * s); int gnutls_crypto_pk_register(int priority, const gnutls_crypto_pk_st * s);