summaryrefslogtreecommitdiff
path: root/lib/cipher.c
diff options
context:
space:
mode:
authorTim Rühsen <tim.ruehsen@gmx.de>2019-10-12 20:59:22 +0200
committerTim Rühsen <tim.ruehsen@gmx.de>2019-10-15 14:51:43 +0200
commite3584fbf2a9760238c3279275e963cf121b3ed0b (patch)
tree958f3c86ee71b66482d4fb8b5c5519ec414875c8 /lib/cipher.c
parentd6ee45fe1cf6715bb728e21bd7ac6c0e9d33d2a8 (diff)
downloadgnutls-e3584fbf2a9760238c3279275e963cf121b3ed0b.tar.gz
Add const to several read-only packet sequence paramstmp-fix-coverity
Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
Diffstat (limited to 'lib/cipher.c')
-rw-r--r--lib/cipher.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/cipher.c b/lib/cipher.c
index 908304ac7d..679a5807c1 100644
--- a/lib/cipher.c
+++ b/lib/cipher.c
@@ -54,14 +54,14 @@ static int decrypt_packet(gnutls_session_t session,
gnutls_datum_t * plain,
content_type_t type,
record_parameters_st * params,
- gnutls_uint64 * sequence);
+ const gnutls_uint64 * sequence);
static int
decrypt_packet_tls13(gnutls_session_t session,
gnutls_datum_t * ciphertext,
gnutls_datum_t * plain,
content_type_t *type, record_parameters_st * params,
- gnutls_uint64 * sequence);
+ const gnutls_uint64 * sequence);
static int
encrypt_packet_tls13(gnutls_session_t session,
@@ -138,7 +138,7 @@ _gnutls_decrypt(gnutls_session_t session,
gnutls_datum_t *output,
content_type_t *type,
record_parameters_st *params,
- gnutls_uint64 *sequence)
+ const gnutls_uint64 *sequence)
{
int ret;
const version_entry_st *vers = get_version(session);
@@ -213,7 +213,7 @@ calc_enc_length_stream(gnutls_session_t session, int data_size,
* and are not to be sent). Returns their size.
*/
int
-_gnutls_make_preamble(uint8_t * uint64_data, uint8_t type, unsigned int length,
+_gnutls_make_preamble(const uint8_t * uint64_data, uint8_t type, unsigned int length,
const version_entry_st * ver, uint8_t preamble[MAX_PREAMBLE_SIZE])
{
uint8_t *p = preamble;
@@ -526,7 +526,7 @@ decrypt_packet(gnutls_session_t session,
gnutls_datum_t * ciphertext,
gnutls_datum_t * plain,
content_type_t type, record_parameters_st * params,
- gnutls_uint64 * sequence)
+ const gnutls_uint64 * sequence)
{
uint8_t tag[MAX_HASH_SIZE];
uint8_t nonce[MAX_CIPHER_IV_SIZE];
@@ -808,7 +808,7 @@ decrypt_packet_tls13(gnutls_session_t session,
gnutls_datum_t *ciphertext,
gnutls_datum_t *plain,
content_type_t *type, record_parameters_st *params,
- gnutls_uint64 *sequence)
+ const gnutls_uint64 *sequence)
{
uint8_t nonce[MAX_CIPHER_IV_SIZE];
size_t length, length_to_decrypt;