From: Nikos Mavrogiannopoulos Date: Tue, 12 Apr 2011 10:18:02 +0000 (+0200) Subject: Added gnutls_cipher_set_iv(). X-Git-Tag: gnutls_2_99_1~48 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0bb26a6e8e9bd7ee23884f17342c8e84033907cf;p=thirdparty%2Fgnutls.git Added gnutls_cipher_set_iv(). --- diff --git a/lib/crypto-api.c b/lib/crypto-api.c index f7f200c2f8..5fb633ebc7 100644 --- a/lib/crypto-api.c +++ b/lib/crypto-api.c @@ -113,6 +113,23 @@ gnutls_cipher_add_auth (gnutls_cipher_hd_t handle, const void *text, size_t text return 0; } +/** + * gnutls_cipher_set_iv: + * @handle: is a #gnutls_cipher_hd_t structure. + * @iv: the IV to set + * @ivlen: The length of the IV + * + * This function will set the IV to be used for the next + * encryption block. + * + * Since: 2.99.0 + **/ +void +gnutls_cipher_set_iv (gnutls_cipher_hd_t handle, void *iv, size_t ivlen) +{ + _gnutls_cipher_setiv((cipher_hd_st *)handle, iv, ivlen); +} + /** * gnutls_cipher_encrypt: * @handle: is a #gnutls_cipher_hd_t structure. diff --git a/lib/includes/gnutls/crypto.h b/lib/includes/gnutls/crypto.h index f1312eeeb7..a1cf4b5ba8 100644 --- a/lib/includes/gnutls/crypto.h +++ b/lib/includes/gnutls/crypto.h @@ -47,6 +47,8 @@ extern "C" size_t textlen, void *ciphertext, size_t ciphertextlen); + void gnutls_cipher_set_iv (gnutls_cipher_hd_t handle, void *iv, size_t ivlen); + int gnutls_cipher_tag( gnutls_cipher_hd_t handle, void* tag, size_t tag_size); int gnutls_cipher_add_auth( gnutls_cipher_hd_t handle, const void* test, size_t textlen); diff --git a/lib/libgnutls.map b/lib/libgnutls.map index 616dab745e..85b301c7e9 100644 --- a/lib/libgnutls.map +++ b/lib/libgnutls.map @@ -701,6 +701,7 @@ GNUTLS_3_0_0 { gnutls_dtls_cookie_send; gnutls_dtls_prestate_set; gnutls_dtls_get_data_mtu; + gnutls_cipher_set_iv; } GNUTLS_2_12; GNUTLS_PRIVATE {