diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-09-29 15:40:36 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2018-02-19 15:29:35 +0100 |
commit | 905565fe0a3687b62ff9fb4c9476a7f886112aa1 (patch) | |
tree | 6b184ea9ea4d935620da3bb7594351b0007574a7 /lib/gnutls_int.h | |
parent | 4f81fa3502fa7a1263622b1fe0ba453bc6e86552 (diff) | |
download | gnutls-905565fe0a3687b62ff9fb4c9476a7f886112aa1.tar.gz |
extensions: avoid looping to discover location of saved data
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'lib/gnutls_int.h')
-rw-r--r-- | lib/gnutls_int.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h index e110631d89..d7a4e7182d 100644 --- a/lib/gnutls_int.h +++ b/lib/gnutls_int.h @@ -278,9 +278,10 @@ typedef enum recv_state_t { */ #define MAX_ALGOS GNUTLS_MAX_ALGORITHM_NUM -/* IDs are non-zero and allocated in a way that all values fit in 64-bit integer as (1<<val) */ +/* IDs are allocated in a way that all values fit in 64-bit integer as (1<<val) */ typedef enum extensions_t { - GNUTLS_EXTENSION_MAX_RECORD_SIZE = 1, + GNUTLS_EXTENSION_INVALID = 0xffff, + GNUTLS_EXTENSION_MAX_RECORD_SIZE = 0, GNUTLS_EXTENSION_STATUS_REQUEST, GNUTLS_EXTENSION_CERT_TYPE, GNUTLS_EXTENSION_SUPPORTED_ECC, @@ -1177,8 +1178,7 @@ typedef struct { struct hello_ext_entry_st *rexts; unsigned rexts_size; - struct { - extensions_t id; + struct { /* ext_data[id] contains data for extension_t id */ gnutls_ext_priv_data_t priv; gnutls_ext_priv_data_t resumed_priv; uint8_t set; |