From: Nikos Mavrogiannopoulos Date: Mon, 10 Jun 2013 17:09:09 +0000 (+0200) Subject: Added gnutls_cipher_get_tag_size(). X-Git-Tag: gnutls_3_2_2~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bf5b932ca96ebb42d918ad5d09fc595966e1d5a;p=thirdparty%2Fgnutls.git Added gnutls_cipher_get_tag_size(). --- diff --git a/NEWS b/NEWS index a515fe42ef..e372571dc2 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,7 @@ subsystems. ** API and ABI modifications: gnutls_certificate_set_trust_list: Added +gnutls_cipher_get_tag_size: Added * Version 3.2.1 (released 2013-06-01) diff --git a/lib/algorithms/ciphers.c b/lib/algorithms/ciphers.c index 022702efb3..6b97a53332 100644 --- a/lib/algorithms/ciphers.c +++ b/lib/algorithms/ciphers.c @@ -94,9 +94,7 @@ const cipher_entry_st* cipher_to_entry(gnutls_cipher_algorithm_t c) * gnutls_cipher_get_block_size: * @algorithm: is an encryption algorithm * - * Get block size for encryption algorithm. - * - * Returns: block size for encryption algorithm. + * Returns: the block size of the encryption algorithm. * * Since: 2.10.0 **/ @@ -109,6 +107,20 @@ gnutls_cipher_get_block_size (gnutls_cipher_algorithm_t algorithm) } +/** + * gnutls_cipher_get_tag_size: + * @algorithm: is an encryption algorithm + * + * Returns: the tag size of the authenticated encryption algorithm. + * + * Since: 3.2.2 + **/ +int +gnutls_cipher_get_tag_size (gnutls_cipher_algorithm_t algorithm) +{ + return _gnutls_cipher_get_tag_size(cipher_to_entry(algorithm)); +} + /** * gnutls_cipher_get_iv_size: * @algorithm: is an encryption algorithm diff --git a/lib/includes/gnutls/crypto.h b/lib/includes/gnutls/crypto.h index ff402fc9ce..44d77f9339 100644 --- a/lib/includes/gnutls/crypto.h +++ b/lib/includes/gnutls/crypto.h @@ -53,7 +53,7 @@ extern "C" void gnutls_cipher_deinit (gnutls_cipher_hd_t handle); int gnutls_cipher_get_block_size (gnutls_cipher_algorithm_t algorithm); int gnutls_cipher_get_iv_size (gnutls_cipher_algorithm_t algorithm); - + int gnutls_cipher_get_tag_size (gnutls_cipher_algorithm_t algorithm); typedef struct hash_hd_st *gnutls_hash_hd_t; typedef struct hmac_hd_st *gnutls_hmac_hd_t; diff --git a/lib/libgnutls.map b/lib/libgnutls.map index f7a41db334..5bd384c72f 100644 --- a/lib/libgnutls.map +++ b/lib/libgnutls.map @@ -912,6 +912,7 @@ GNUTLS_3_1_0 { gnutls_alpn_set_protocols; gnutls_session_set_id; gnutls_certificate_set_trust_list; + gnutls_cipher_get_tag_size; } GNUTLS_3_0_0; GNUTLS_PRIVATE {