diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2019-10-18 13:19:04 +0300 |
---|---|---|
committer | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2019-10-21 14:16:24 +0300 |
commit | 9e6d30751c911a64cc0bbe37f65ca124a9ec51cc (patch) | |
tree | 99268b45584fc5ca0b1a8a8a7149105a7d3867fb /lib/gnutls_int.h | |
parent | c6b6f3130d4b9c88a5471ff7f7b113be8e8c8411 (diff) | |
download | gnutls-9e6d30751c911a64cc0bbe37f65ca124a9ec51cc.tar.gz |
cipher: replace several bools with single flags instance
Replace bools in cipher_entry_st with flags field.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Diffstat (limited to 'lib/gnutls_int.h')
-rw-r--r-- | lib/gnutls_int.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h index 7f7b6a7c97..33c2318030 100644 --- a/lib/gnutls_int.h +++ b/lib/gnutls_int.h @@ -645,6 +645,10 @@ typedef struct record_state_st record_state_st; struct record_parameters_st; typedef struct record_parameters_st record_parameters_st; +#define GNUTLS_CIPHER_FLAG_ONLY_AEAD (1 << 0) /* When set, this cipher is only available through the new AEAD API */ +#define GNUTLS_CIPHER_FLAG_XOR_NONCE (1 << 1) /* In this TLS AEAD cipher xor the implicit_iv with the nonce */ +#define GNUTLS_CIPHER_FLAG_NO_REKEY (1 << 2) /* whether this tls1.3 cipher doesn't need to rekey after 2^24 messages */ + /* cipher and mac parameters */ typedef struct cipher_entry_st { const char *name; @@ -656,9 +660,7 @@ typedef struct cipher_entry_st { uint16_t explicit_iv; /* the size of explicit IV - the IV stored in record */ uint16_t cipher_iv; /* the size of IV needed by the cipher */ uint16_t tagsize; - bool xor_nonce; /* In this TLS AEAD cipher xor the implicit_iv with the nonce */ - bool only_aead; /* When set, this cipher is only available through the new AEAD API */ - bool no_rekey; /* whether this tls1.3 cipher doesn't need to rekey after 2^24 messages */ + unsigned flags; } cipher_entry_st; typedef struct gnutls_cipher_suite_entry_st { |