Coverage Report

Created: 2024-07-23 07:36

/src/gnutls/lib/gnutls_int.h
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Copyright (C) 2000-2016 Free Software Foundation, Inc.
3
 * Copyright (C) 2015-2018 Red Hat, Inc.
4
 *
5
 * Author: Nikos Mavrogiannopoulos
6
 *
7
 * This file is part of GnuTLS.
8
 *
9
 * The GnuTLS is free software; you can redistribute it and/or
10
 * modify it under the terms of the GNU Lesser General Public License
11
 * as published by the Free Software Foundation; either version 2.1 of
12
 * the License, or (at your option) any later version.
13
 *
14
 * This library is distributed in the hope that it will be useful, but
15
 * WITHOUT ANY WARRANTY; without even the implied warranty of
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17
 * Lesser General Public License for more details.
18
 *
19
 * You should have received a copy of the GNU Lesser General Public License
20
 * along with this program.  If not, see <https://www.gnu.org/licenses/>
21
 *
22
 */
23
24
#ifndef GNUTLS_LIB_GNUTLS_INT_H
25
#define GNUTLS_LIB_GNUTLS_INT_H
26
27
#ifdef HAVE_CONFIG_H
28
#include "config.h"
29
#endif
30
31
#include <stddef.h>
32
#include <string.h>
33
#include <stdlib.h>
34
#include <stdio.h>
35
#include <ctype.h>
36
#include <limits.h>
37
#include <stdint.h>
38
#include <stdbool.h>
39
#include <assert.h>
40
41
#ifdef NO_SSIZE_T
42
#define HAVE_SSIZE_T
43
typedef int ssize_t;
44
#endif
45
46
#include <sys/types.h>
47
#include <unistd.h>
48
#include <sys/stat.h>
49
#if HAVE_SYS_SOCKET_H
50
#include <sys/socket.h>
51
#elif HAVE_WS2TCPIP_H
52
#include <ws2tcpip.h>
53
#endif
54
#include <time.h>
55
56
#include "attribute.h"
57
58
#define ENABLE_ALIGN16
59
60
#ifdef __clang_major
61
#define _GNUTLS_CLANG_VERSION \
62
  (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
63
#else
64
#define _GNUTLS_CLANG_VERSION 0
65
#endif
66
67
/* clang also defines __GNUC__. It promotes a GCC version of 4.2.1. */
68
#ifdef __GNUC__
69
#define _GNUTLS_GCC_VERSION \
70
  (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
71
#endif
72
73
#if _GNUTLS_GCC_VERSION >= 30100
74
0
#define likely(x) __builtin_expect((x), 1)
75
240
#define unlikely(x) __builtin_expect((x), 0)
76
#else
77
#define likely
78
#define unlikely
79
#endif
80
81
#include <gnutls/gnutls.h>
82
#include <gnutls/dtls.h>
83
#include <gnutls/abstract.h>
84
#include <gnutls/socket.h>
85
#include "system.h"
86
87
/* in case we compile with system headers taking priority, we
88
 * make sure that some new attributes are still available.
89
 */
90
#ifndef __GNUTLS_CONST__
91
#define __GNUTLS_CONST__
92
#endif
93
94
/* The size of a handshake message should not
95
 * be larger than this value.
96
 */
97
0
#define MAX_HANDSHAKE_PACKET_SIZE 128 * 1024
98
99
0
#define GNUTLS_DEF_SESSION_ID_SIZE 32
100
101
/* The maximum digest size of hash algorithms.
102
 */
103
#define MAX_FILENAME 512
104
0
#define MAX_HASH_SIZE 64
105
106
0
#define MAX_MAC_KEY_SIZE 64
107
108
0
#define MAX_CIPHER_BLOCK_SIZE 64 /* CHACHA20 */
109
#define MAX_CIPHER_KEY_SIZE 32
110
111
#define MAX_CIPHER_IV_SIZE 16
112
113
/* Maximum size of 2^16-1 has been chosen so that usernames can hold
114
 * PSK identities as defined in RFC 4279 section 2 and RFC 8446 section 4.2.11
115
 */
116
0
#define MAX_USERNAME_SIZE 65535
117
0
#define MAX_SERVER_NAME_SIZE 256
118
119
#define AEAD_EXPLICIT_DATA_SIZE 8
120
#define AEAD_IMPLICIT_DATA_SIZE 4
121
122
0
#define GNUTLS_MASTER_SIZE 48
123
0
#define GNUTLS_RANDOM_SIZE 32
124
125
/* Under TLS1.3 a hello retry request is sent as server hello */
126
#define REAL_HSK_TYPE(t)                               \
127
0
  ((t) == GNUTLS_HANDSHAKE_HELLO_RETRY_REQUEST ? \
128
0
     GNUTLS_HANDSHAKE_SERVER_HELLO :       \
129
0
     t)
130
131
/* DTLS */
132
0
#define DTLS_RETRANS_TIMEOUT 1000
133
134
/* TLS Extensions */
135
/* we can receive up to MAX_EXT_TYPES extensions.
136
 */
137
0
#define MAX_EXT_TYPES 64
138
139
/* TLS-internal extension (will be parsed after a ciphersuite is selected).
140
 * This amends the gnutls_ext_parse_type_t. Not exported yet to allow more refining
141
 * prior to finalizing an API. */
142
0
#define _GNUTLS_EXT_TLS_POST_CS 177
143
144
/* expire time for resuming sessions */
145
0
#define DEFAULT_EXPIRE_TIME 21600
146
0
#define STEK_ROTATION_PERIOD_PRODUCT 3
147
0
#define DEFAULT_HANDSHAKE_TIMEOUT_MS 40 * 1000
148
149
/* The EC group to be used when the extension
150
 * supported groups/curves is not present */
151
0
#define DEFAULT_EC_GROUP GNUTLS_GROUP_SECP256R1
152
153
typedef enum transport_t {
154
  GNUTLS_STREAM,
155
  GNUTLS_DGRAM
156
} transport_t;
157
158
/* The TLS 1.3 stage of handshake */
159
typedef enum hs_stage_t {
160
  STAGE_HS,
161
  STAGE_APP,
162
  STAGE_UPD_OURS,
163
  STAGE_UPD_PEERS,
164
  STAGE_EARLY
165
} hs_stage_t;
166
167
typedef enum record_send_state_t {
168
  RECORD_SEND_NORMAL = 0,
169
  RECORD_SEND_CORKED, /* corked and transition to NORMAL afterwards */
170
  RECORD_SEND_CORKED_TO_KU, /* corked but must transition to RECORD_SEND_KEY_UPDATE_1 */
171
  RECORD_SEND_KEY_UPDATE_1,
172
  RECORD_SEND_KEY_UPDATE_2,
173
  RECORD_SEND_KEY_UPDATE_3
174
} record_send_state_t;
175
176
/* The mode check occurs a lot throughout GnuTLS and can be replaced by
177
 * the following shorter macro. Also easier to update one macro
178
 * in the future when the internal structure changes than all the conditionals
179
 * itself.
180
 */
181
#define IS_SERVER(session) \
182
0
  (session->security_parameters.entity == GNUTLS_SERVER)
183
184
/* To check whether we have a DTLS session */
185
0
#define IS_DTLS(session) (session->internals.transport == GNUTLS_DGRAM)
186
187
/* To check whether we have a KTLS enabled */
188
#define IS_KTLS_ENABLED(session, interface) \
189
0
  (session->internals.ktls_enabled & interface)
190
191
/* the maximum size of encrypted packets */
192
0
#define DEFAULT_MAX_RECORD_SIZE 16384
193
0
#define DEFAULT_MAX_EARLY_DATA_SIZE 16384
194
0
#define TLS_RECORD_HEADER_SIZE 5
195
0
#define DTLS_RECORD_HEADER_SIZE (TLS_RECORD_HEADER_SIZE + 8)
196
#define RECORD_HEADER_SIZE(session) \
197
0
  (IS_DTLS(session) ? DTLS_RECORD_HEADER_SIZE : TLS_RECORD_HEADER_SIZE)
198
#define MAX_RECORD_HEADER_SIZE DTLS_RECORD_HEADER_SIZE
199
200
0
#define MIN_RECORD_SIZE 512
201
0
#define MIN_RECORD_SIZE_SMALL 64
202
203
/* The following macro is used to calculate the overhead when sending.
204
 * when receiving we use a different way as there are implementations that
205
 * store more data than allowed.
206
 */
207
#define MAX_RECORD_SEND_OVERHEAD(session) \
208
0
  (MAX_CIPHER_BLOCK_SIZE /*iv*/ + MAX_PAD_SIZE + MAX_HASH_SIZE /*MAC*/)
209
0
#define MAX_PAD_SIZE 255
210
0
#define EXTRA_COMP_SIZE 2048
211
212
0
#define TLS_HANDSHAKE_HEADER_SIZE 4
213
0
#define DTLS_HANDSHAKE_HEADER_SIZE (TLS_HANDSHAKE_HEADER_SIZE + 8)
214
#define HANDSHAKE_HEADER_SIZE(session)                   \
215
0
  (IS_DTLS(session) ? DTLS_HANDSHAKE_HEADER_SIZE : \
216
0
          TLS_HANDSHAKE_HEADER_SIZE)
217
#define MAX_HANDSHAKE_HEADER_SIZE DTLS_HANDSHAKE_HEADER_SIZE
218
219
/* Maximum seed size for provable parameters */
220
#define MAX_PVP_SEED_SIZE 256
221
222
/* This is the maximum handshake message size we send without
223
   fragmentation. This currently ignores record layer overhead. */
224
0
#define DTLS_DEFAULT_MTU 1200
225
226
/* the maximum size of the DTLS cookie */
227
0
#define DTLS_MAX_COOKIE_SIZE 32
228
229
/* The maximum number of HELLO_VERIFY_REQUEST messages the client
230
   processes before aborting. */
231
0
#define MAX_HANDSHAKE_HELLO_VERIFY_REQUESTS 5
232
233
0
#define MAX_PK_PARAM_SIZE 2048
234
235
/* Defaults for verification functions.
236
 *
237
 * update many_icas in tests/test-chains.h when increasing
238
 * DEFAULT_MAX_VERIFY_DEPTH.
239
 */
240
0
#define DEFAULT_MAX_VERIFY_DEPTH 16
241
0
#define DEFAULT_MAX_VERIFY_BITS (MAX_PK_PARAM_SIZE * 8)
242
0
#define MAX_VERIFY_DEPTH 4096
243
244
#include "mem.h"
245
246
0
#define MEMSUB(x, y) ((ssize_t)((ptrdiff_t)x - (ptrdiff_t)y))
247
248
#define DECR_LEN(len, x) \
249
0
  DECR_LENGTH_RET(len, x, GNUTLS_E_UNEXPECTED_PACKET_LENGTH)
250
#define DECR_LEN_FINAL(len, x)                                      \
251
0
  do {                                                        \
252
0
    if (len != x)                                       \
253
0
      return gnutls_assert_val(                   \
254
0
        GNUTLS_E_UNEXPECTED_PACKET_LENGTH); \
255
0
    else                                                \
256
0
      len = 0;                                    \
257
0
  } while (0)
258
0
#define DECR_LENGTH_RET(len, x, RET) DECR_LENGTH_COM(len, x, return RET)
259
#define DECR_LENGTH_COM(len, x, COM)     \
260
0
  do {                             \
261
0
    if (len < x) {           \
262
0
      gnutls_assert(); \
263
0
      COM;             \
264
0
    } else                   \
265
0
      len -= x;        \
266
0
  } while (0)
267
268
0
#define GNUTLS_POINTER_TO_INT(_) ((int)GNUTLS_POINTER_TO_INT_CAST(_))
269
#define GNUTLS_INT_TO_POINTER(_) ((void *)GNUTLS_POINTER_TO_INT_CAST(_))
270
271
0
#define GNUTLS_KX_INVALID (-1)
272
273
#include "mpi.h"
274
275
typedef enum handshake_state_t {
276
  STATE0 = 0,
277
  STATE1,
278
  STATE2,
279
  STATE3,
280
  STATE4,
281
  STATE5,
282
  STATE6,
283
  STATE7,
284
  STATE8,
285
  STATE9,
286
  STATE10,
287
  STATE11,
288
  STATE12,
289
  STATE13,
290
  STATE14,
291
  STATE15,
292
  STATE16,
293
  STATE17,
294
  STATE18,
295
  STATE19,
296
  STATE20 = 20,
297
  STATE21,
298
  STATE22,
299
  STATE30 = 30,
300
  STATE31,
301
  STATE40 = 40,
302
  STATE41,
303
  STATE50 = 50,
304
  STATE90 = 90,
305
  STATE91,
306
  STATE92,
307
  STATE93,
308
  STATE94,
309
  STATE99 = 99,
310
  STATE100 = 100,
311
  STATE101,
312
  STATE102,
313
  STATE103,
314
  STATE104,
315
  STATE105,
316
  STATE106,
317
  STATE107,
318
  STATE108,
319
  STATE109,
320
  STATE110,
321
  STATE111,
322
  STATE112,
323
  STATE113,
324
  STATE114,
325
  STATE115,
326
  STATE150 /* key update */
327
} handshake_state_t;
328
329
typedef enum bye_state_t {
330
  BYE_STATE0 = 0,
331
  BYE_STATE1,
332
  BYE_STATE2
333
} bye_state_t;
334
335
typedef enum send_ticket_state_t {
336
  TICKET_STATE0 = 0,
337
  TICKET_STATE1
338
} send_ticket_state_t;
339
340
typedef enum reauth_state_t {
341
  REAUTH_STATE0 = 0,
342
  REAUTH_STATE1,
343
  REAUTH_STATE2,
344
  REAUTH_STATE3,
345
  REAUTH_STATE4,
346
  REAUTH_STATE5
347
} reauth_state_t;
348
349
0
#define TICKET_STATE session->internals.ticket_state
350
0
#define BYE_STATE session->internals.bye_state
351
0
#define REAUTH_STATE session->internals.reauth_state
352
353
typedef enum heartbeat_state_t {
354
  SHB_SEND1 = 0,
355
  SHB_SEND2,
356
  SHB_RECV
357
} heartbeat_state_t;
358
359
typedef enum recv_state_t {
360
  RECV_STATE_0 = 0,
361
  RECV_STATE_DTLS_RETRANSMIT,
362
  /* client-side false start state */
363
  RECV_STATE_FALSE_START_HANDLING, /* we are calling gnutls_handshake() within record_recv() */
364
  RECV_STATE_FALSE_START, /* gnutls_record_recv() should complete the handshake */
365
  /* async handshake msg state */
366
  RECV_STATE_ASYNC_HANDSHAKE, /* an incomplete async handshake message was seen */
367
  /* server-side early start under TLS1.3; enabled when no client cert is received */
368
  RECV_STATE_EARLY_START_HANDLING, /* we are calling gnutls_handshake() within record_recv() */
369
  RECV_STATE_EARLY_START, /* gnutls_record_recv() should complete the handshake */
370
  RECV_STATE_REHANDSHAKE, /* gnutls_record_recv() should complete any incoming re-handshake requests */
371
  RECV_STATE_REAUTH /* gnutls_record_recv() should complete any incoming reauthentication requests */
372
} recv_state_t;
373
374
#include "str.h"
375
376
/* This is the maximum number of algorithms (ciphers or macs etc).
377
 * keep it synced with GNUTLS_MAX_ALGORITHM_NUM in gnutls.h
378
 */
379
0
#define MAX_ALGOS GNUTLS_MAX_ALGORITHM_NUM
380
381
/* IDs are allocated in a way that all values fit in 64-bit integer as (1<<val) */
382
typedef enum extensions_t {
383
  GNUTLS_EXTENSION_INVALID = 0xffff,
384
  GNUTLS_EXTENSION_STATUS_REQUEST = 0,
385
  GNUTLS_EXTENSION_CERT_TYPE,
386
  GNUTLS_EXTENSION_CLIENT_CERT_TYPE,
387
  GNUTLS_EXTENSION_SERVER_CERT_TYPE,
388
  GNUTLS_EXTENSION_SUPPORTED_GROUPS,
389
  GNUTLS_EXTENSION_SUPPORTED_EC_POINT_FORMATS,
390
  GNUTLS_EXTENSION_SRP,
391
  GNUTLS_EXTENSION_SIGNATURE_ALGORITHMS,
392
  GNUTLS_EXTENSION_SRTP,
393
  GNUTLS_EXTENSION_HEARTBEAT,
394
  GNUTLS_EXTENSION_ALPN,
395
  GNUTLS_EXTENSION_ETM,
396
  GNUTLS_EXTENSION_EXT_MASTER_SECRET,
397
  GNUTLS_EXTENSION_SESSION_TICKET,
398
  GNUTLS_EXTENSION_KEY_SHARE,
399
  GNUTLS_EXTENSION_SUPPORTED_VERSIONS,
400
  GNUTLS_EXTENSION_POST_HANDSHAKE,
401
  GNUTLS_EXTENSION_SAFE_RENEGOTIATION,
402
  GNUTLS_EXTENSION_SERVER_NAME,
403
  GNUTLS_EXTENSION_COOKIE,
404
  GNUTLS_EXTENSION_EARLY_DATA,
405
  GNUTLS_EXTENSION_PSK_KE_MODES,
406
  GNUTLS_EXTENSION_RECORD_SIZE_LIMIT,
407
  GNUTLS_EXTENSION_MAX_RECORD_SIZE,
408
  GNUTLS_EXTENSION_COMPRESS_CERTIFICATE,
409
  /*
410
   * pre_shared_key and dumbfw must always be the last extensions,
411
   * in that order */
412
  GNUTLS_EXTENSION_DUMBFW,
413
  GNUTLS_EXTENSION_PRE_SHARED_KEY,
414
  GNUTLS_EXTENSION_MAX /* not real extension - used for iterators */
415
} extensions_t;
416
417
0
#define GNUTLS_EXTENSION_MAX_VALUE 63
418
#define ext_track_t uint64_t
419
420
#include <verify.h>
421
422
verify(GNUTLS_EXTENSION_MAX < GNUTLS_EXTENSION_MAX_VALUE);
423
verify(GNUTLS_EXTENSION_MAX < MAX_EXT_TYPES);
424
425
/* we must provide at least 16 extensions for users to register;
426
 * increase GNUTLS_EXTENSION_MAX_VALUE, MAX_EXT_TYPES and used_exts
427
 * type if this fails
428
 */
429
verify(GNUTLS_EXTENSION_MAX_VALUE - GNUTLS_EXTENSION_MAX >= 16);
430
431
/* MAX_EXT_TYPES must fit in a single byte, to generate random
432
 * permutation at once.
433
 */
434
verify(MAX_EXT_TYPES <= UINT8_MAX);
435
436
/* The 'verify' symbol from <verify.h> is used extensively in the
437
 * code; undef it to avoid clash
438
 */
439
#undef verify
440
441
typedef enum {
442
  CIPHER_STREAM,
443
  CIPHER_BLOCK,
444
  CIPHER_AEAD
445
} cipher_type_t;
446
447
/* Record Protocol */
448
typedef enum content_type_t {
449
  GNUTLS_CHANGE_CIPHER_SPEC = 20,
450
  GNUTLS_ALERT,
451
  GNUTLS_HANDSHAKE,
452
  GNUTLS_APPLICATION_DATA,
453
  GNUTLS_HEARTBEAT
454
} content_type_t;
455
456
#define GNUTLS_PK_ANY (gnutls_pk_algorithm_t) - 1
457
#define GNUTLS_PK_NONE (gnutls_pk_algorithm_t) - 2
458
459
#define GNUTLS_PK_IS_RSA(pk)                                   \
460
0
  ((pk) == GNUTLS_PK_RSA || (pk) == GNUTLS_PK_RSA_PSS || \
461
0
   (pk) == GNUTLS_PK_RSA_OAEP)
462
463
/* Message buffers (mbuffers) structures */
464
465
/* this is actually the maximum number of distinct handshake
466
 * messages that can arrive in a single flight
467
 */
468
0
#define MAX_HANDSHAKE_MSGS 6
469
typedef struct {
470
  /* Handshake layer type and sequence of message */
471
  gnutls_handshake_description_t htype;
472
473
  /* The "real" type received; that is, it does not distinguish
474
   * HRR from server hello, while htype does */
475
  gnutls_handshake_description_t rtype;
476
  uint32_t length;
477
478
  /* valid in DTLS */
479
  uint16_t sequence;
480
481
  /* indicate whether that message is complete.
482
   * complete means start_offset == 0 and end_offset == length
483
   */
484
  uint32_t start_offset;
485
  uint32_t end_offset;
486
487
  uint8_t header[MAX_HANDSHAKE_HEADER_SIZE];
488
  int header_size;
489
490
  gnutls_buffer_st data;
491
} handshake_buffer_st;
492
493
typedef struct mbuffer_st {
494
  /* when used in mbuffer_head_st */
495
  struct mbuffer_st *next;
496
  struct mbuffer_st *prev;
497
498
  /* msg->size - mark = number of bytes left to process in this
499
     message. Mark should only be non-zero when this buffer is the
500
     head of the queue. */
501
  size_t mark;
502
503
  /* the data */
504
  gnutls_datum_t msg;
505
  size_t maximum_size;
506
507
  /* used during fill in, to separate header from data
508
   * body. */
509
  unsigned int uhead_mark;
510
511
  /* Filled in by record layer on recv:
512
   * type, record_sequence
513
   */
514
515
  /* record layer content type */
516
  content_type_t type;
517
518
  /* record layer sequence */
519
  uint64_t record_sequence;
520
521
  /* Filled in by handshake layer on send:
522
   * type, epoch, htype, handshake_sequence
523
   */
524
525
  /* Record layer epoch of message */
526
  uint16_t epoch;
527
528
  /* Handshake layer type and sequence of message */
529
  gnutls_handshake_description_t htype;
530
  uint16_t handshake_sequence;
531
} mbuffer_st;
532
533
typedef struct mbuffer_head_st {
534
  mbuffer_st *head;
535
  mbuffer_st *tail;
536
537
  unsigned int length;
538
  size_t byte_length;
539
} mbuffer_head_st;
540
541
/* Store & Retrieve functions defines:
542
 */
543
544
typedef struct auth_cred_st {
545
  gnutls_credentials_type_t algorithm;
546
547
  /* the type of credentials depends on algorithm
548
   */
549
  void *credentials;
550
  struct auth_cred_st *next;
551
} auth_cred_st;
552
553
/* session ticket definitions */
554
#define TICKET_MASTER_KEY_SIZE \
555
0
  (TICKET_KEY_NAME_SIZE + TICKET_CIPHER_KEY_SIZE + TICKET_MAC_SECRET_SIZE)
556
0
#define TICKET_KEY_NAME_SIZE 16
557
0
#define TICKET_CIPHER_KEY_SIZE 32
558
0
#define TICKET_MAC_SECRET_SIZE 16
559
560
/* These are restricted by TICKET_CIPHER_KEY_SIZE and TICKET_MAC_SECRET_SIZE */
561
#define TICKET_CIPHER GNUTLS_CIPHER_AES_256_CBC
562
0
#define TICKET_IV_SIZE 16
563
0
#define TICKET_BLOCK_SIZE 16
564
565
#define TICKET_MAC_ALGO GNUTLS_MAC_SHA1
566
0
#define TICKET_MAC_SIZE 20 /* HMAC-SHA1 */
567
568
struct ticket_st {
569
  uint8_t key_name[TICKET_KEY_NAME_SIZE];
570
  uint8_t IV[TICKET_IV_SIZE];
571
  uint8_t *encrypted_state;
572
  uint16_t encrypted_state_len;
573
  uint8_t mac[TICKET_MAC_SIZE];
574
};
575
576
struct binder_data_st {
577
  const struct mac_entry_st *prf; /* non-null if this struct is set */
578
  gnutls_datum_t psk;
579
580
  /* 0-based index of the selected PSK.
581
   * This only applies if the HSK_PSK_SELECTED flag is set in internals.hsk_flags,
582
   * which signals a PSK has indeed been selected. */
583
  uint8_t idx;
584
  uint8_t resumption; /* whether it is a resumption binder */
585
};
586
587
typedef void (*gnutls_stek_rotation_callback_t)(const gnutls_datum_t *prev_key,
588
            const gnutls_datum_t *new_key,
589
            uint64_t t);
590
591
struct gnutls_key_st {
592
  struct { /* These are kept outside the TLS1.3 union as they are
593
         * negotiated via extension, even before protocol is negotiated */
594
    gnutls_pk_params_st ecdh_params;
595
    gnutls_pk_params_st ecdhx_params;
596
    gnutls_pk_params_st dh_params;
597
    gnutls_pk_params_st kem_params;
598
  } kshare;
599
600
  /* The union contents depend on the negotiated protocol.
601
   * It should not contain any values which are allocated
602
   * prior to protocol negotiation, as it would be impossible
603
   * to deinitialize.
604
   */
605
  union {
606
    struct {
607
      /* the current (depending on state) secret, can be
608
       * early_secret, client_early_traffic_secret, ... */
609
      uint8_t temp_secret[MAX_HASH_SIZE];
610
      unsigned temp_secret_size; /* depends on negotiated PRF size */
611
      uint8_t e_ckey
612
        [MAX_HASH_SIZE]; /* client_early_traffic_secret */
613
      uint8_t hs_ckey
614
        [MAX_HASH_SIZE]; /* client_hs_traffic_secret */
615
      uint8_t hs_skey
616
        [MAX_HASH_SIZE]; /* server_hs_traffic_secret */
617
      uint8_t ap_ckey
618
        [MAX_HASH_SIZE]; /* client_ap_traffic_secret */
619
      uint8_t ap_skey
620
        [MAX_HASH_SIZE]; /* server_ap_traffic_secret */
621
      uint8_t ap_expkey
622
        [MAX_HASH_SIZE]; /* {early_,}exporter_master_secret */
623
      uint8_t ap_rms[MAX_HASH_SIZE]; /* resumption_master_secret */
624
    } tls13; /* tls1.3 */
625
626
    /* Follow the SSL3.0 and TLS1.2 key exchanges */
627
    struct {
628
      /* For ECDH KX */
629
      struct {
630
        gnutls_pk_params_st params; /* private part */
631
        /* public part */
632
        bigint_t x;
633
        bigint_t y;
634
        gnutls_datum_t
635
          raw; /* public key used in ECDHX (point) */
636
      } ecdh;
637
638
      /* For DH KX */
639
      struct {
640
        gnutls_pk_params_st params;
641
        bigint_t client_Y;
642
      } dh;
643
644
      /* for SRP KX */
645
      struct {
646
        bigint_t srp_key;
647
        bigint_t srp_g;
648
        bigint_t srp_p;
649
        bigint_t A;
650
        bigint_t B;
651
        bigint_t u;
652
        bigint_t b;
653
        bigint_t a;
654
        bigint_t x;
655
      } srp;
656
    } tls12; /* from ssl3.0 to tls12 */
657
  } proto;
658
659
  /* binders / pre-shared keys in use; temporary storage.
660
   * On client side it will hold data for the resumption and external
661
   * PSKs After server hello is received the selected binder is set on 0 position
662
   * and HSK_PSK_SELECTED is set.
663
   *
664
   * On server side the first value is populated with
665
   * the selected PSK data if HSK_PSK_SELECTED flag is set. */
666
  struct binder_data_st binders[2];
667
668
  /* TLS pre-master key; applies to 1.2 and 1.3 */
669
  gnutls_datum_t key;
670
671
  uint8_t
672
    /* The key to encrypt and decrypt session tickets */
673
    session_ticket_key[TICKET_MASTER_KEY_SIZE],
674
    /* Static buffer for the previous key, whenever we need it */
675
    previous_ticket_key[TICKET_MASTER_KEY_SIZE],
676
    /* Initial key supplied by the caller */
677
    initial_stek[TICKET_MASTER_KEY_SIZE];
678
679
  /* Whether the initial_stek is set through
680
   * gnutls_session_ticket_enable_server() */
681
  bool stek_initialized;
682
683
  /* this is used to hold the peers authentication data
684
   */
685
  /* auth_info_t structures SHOULD NOT contain malloced
686
   * elements. Check gnutls_session_pack.c, and gnutls_auth.c.
687
   * Remember that this should be calloced!
688
   */
689
  void *auth_info;
690
  gnutls_credentials_type_t auth_info_type;
691
  int auth_info_size; /* needed in order to store to db for restoring
692
         */
693
  auth_cred_st *cred; /* used to specify keys/certificates etc */
694
695
  struct {
696
    uint64_t last_result;
697
    uint8_t was_rotated;
698
    gnutls_stek_rotation_callback_t cb;
699
  } totp;
700
};
701
702
typedef struct gnutls_key_st gnutls_key_st;
703
704
struct pin_info_st {
705
  gnutls_pin_callback_t cb;
706
  void *data;
707
};
708
709
struct record_state_st;
710
typedef struct record_state_st record_state_st;
711
712
struct record_parameters_st;
713
typedef struct record_parameters_st record_parameters_st;
714
715
#define GNUTLS_CIPHER_FLAG_ONLY_AEAD \
716
0
  (1                           \
717
0
   << 0) /* When set, this cipher is only available through the new AEAD API */
718
#define GNUTLS_CIPHER_FLAG_XOR_NONCE \
719
0
  (1                           \
720
0
   << 1) /* In this TLS AEAD cipher xor the implicit_iv with the nonce */
721
#define GNUTLS_CIPHER_FLAG_NO_REKEY \
722
0
  (1                          \
723
0
   << 2) /* whether this tls1.3 cipher doesn't need to rekey after 2^24 messages */
724
#define GNUTLS_CIPHER_FLAG_TAG_PREFIXED \
725
0
  (1 << 3) /* When set, this cipher prefixes authentication tag */
726
727
/* cipher and mac parameters */
728
typedef struct cipher_entry_st {
729
  const char *name;
730
  gnutls_cipher_algorithm_t id;
731
  uint16_t blocksize;
732
  uint16_t keysize;
733
  cipher_type_t type;
734
  uint16_t implicit_iv; /* the size of implicit IV - the IV generated but not sent */
735
  uint16_t explicit_iv; /* the size of explicit IV - the IV stored in record */
736
  uint16_t cipher_iv; /* the size of IV needed by the cipher */
737
  uint16_t tagsize;
738
  unsigned flags;
739
} cipher_entry_st;
740
741
typedef struct gnutls_cipher_suite_entry_st {
742
  const char *name;
743
  const uint8_t id[2];
744
  const char *canonical_name;
745
  gnutls_cipher_algorithm_t block_algorithm;
746
  gnutls_kx_algorithm_t kx_algorithm;
747
  gnutls_mac_algorithm_t mac_algorithm;
748
  gnutls_protocol_t min_version; /* this cipher suite is supported
749
           * from 'version' and above;
750
           */
751
  gnutls_protocol_t max_version; /* this cipher suite is not supported
752
           * after 'version' and above;
753
           */
754
  gnutls_protocol_t min_dtls_version; /* DTLS min version */
755
  gnutls_protocol_t max_dtls_version; /* DTLS max version */
756
  gnutls_mac_algorithm_t prf;
757
} gnutls_cipher_suite_entry_st;
758
759
typedef struct gnutls_group_entry_st {
760
  const char *name;
761
  gnutls_group_t id;
762
  const gnutls_datum_t *prime;
763
  const gnutls_datum_t *q;
764
  const gnutls_datum_t *generator;
765
  const unsigned *q_bits;
766
  gnutls_ecc_curve_t curve;
767
  gnutls_pk_algorithm_t pk;
768
  gnutls_pk_algorithm_t pk2;
769
  unsigned tls_id; /* The RFC4492 namedCurve ID or TLS 1.3 group ID */
770
} gnutls_group_entry_st;
771
772
#define GNUTLS_MAC_FLAG_PREIMAGE_INSECURE \
773
0
  1 /* if this algorithm should not be trusted for pre-image attacks */
774
#define GNUTLS_MAC_FLAG_CONTINUOUS_MAC \
775
0
  (1 << 1) /* if this MAC should be used in a 'continuous' way in TLS */
776
#define GNUTLS_MAC_FLAG_PREIMAGE_INSECURE_REVERTIBLE \
777
0
  (1                                           \
778
0
   << 2) /* if this algorithm should not be trusted for pre-image attacks, but can be enabled through API */
779
#define GNUTLS_MAC_FLAG_ALLOW_INSECURE_REVERTIBLE \
780
0
  (1                                        \
781
0
   << 3) /* when checking with _gnutls_digest_is_insecure2, don't treat revertible setting as fatal */
782
#define GNUTLS_MAC_FLAG_XOF \
783
0
  (1 << 4) /* this function is an extendable output function (XOF) */
784
/* This structure is used both for MACs and digests
785
 */
786
typedef struct mac_entry_st {
787
  const char *name;
788
  const char *oid; /* OID of the hash - if it is a hash */
789
  const char *mac_oid; /* OID of the MAC algorithm - if it is a MAC */
790
  gnutls_mac_algorithm_t id;
791
  unsigned output_size;
792
  unsigned key_size;
793
  unsigned nonce_size;
794
  unsigned placeholder; /* if set, then not a real MAC */
795
  unsigned block_size; /* internal block size for HMAC */
796
  unsigned flags;
797
} mac_entry_st;
798
799
typedef struct {
800
  const char *name;
801
  gnutls_protocol_t id; /* gnutls internal version number */
802
  unsigned age; /* internal ordering by protocol age */
803
  uint8_t major; /* defined by the protocol */
804
  uint8_t minor; /* defined by the protocol */
805
  transport_t transport; /* Type of transport, stream or datagram */
806
  bool supported; /* 0 not supported, > 0 is supported */
807
  bool supported_revertible;
808
  bool explicit_iv;
809
  bool extensions; /* whether it supports extensions */
810
  bool selectable_sighash; /* whether signatures can be selected */
811
  bool selectable_prf; /* whether the PRF is ciphersuite-defined */
812
813
  /* if SSL3 is disabled this flag indicates that this protocol is a placeholder,
814
   * otherwise it prevents this protocol from being set as record version */
815
  bool obsolete;
816
  bool tls13_sem; /* The TLS 1.3 handshake semantics */
817
  bool false_start; /* That version can be used with false start */
818
  bool only_extension; /* negotiated only with an extension */
819
  bool post_handshake_auth; /* Supports the TLS 1.3 post handshake auth */
820
  bool key_shares; /* TLS 1.3 key share key exchange */
821
  bool multi_ocsp; /* TLS 1.3 multiple OCSP responses */
822
  /*
823
   * TLS versions modify the semantics of signature algorithms. This number
824
   * is there to distinguish signature algorithms semantics between versions
825
   * (maps to sign_algorithm_st->tls_sem)
826
   */
827
  uint8_t tls_sig_sem;
828
} version_entry_st;
829
830
/* STATE (cont) */
831
832
#include "hash_int.h"
833
#include "cipher_int.h"
834
835
typedef struct {
836
  uint8_t id[2]; /* used to be (in TLS 1.2) hash algorithm , PK algorithm */
837
  uint8_t tls_sem; /* should match the protocol version's tls_sig_sem. */
838
} sign_algorithm_st;
839
840
/* This structure holds parameters got from TLS extension
841
 * mechanism. (some extensions may hold parameters in auth_info_t
842
 * structures also - see SRP).
843
 */
844
845
0
#define MAX_VERIFY_DATA_SIZE 36 /* in SSL 3.0, 12 in TLS 1.0 */
846
847
/* auth_info_t structures now MAY contain malloced
848
 * elements.
849
 */
850
851
/* This structure and auth_info_t, are stored in the resume database,
852
 * and are restored, in case of resume.
853
 * Holds all the required parameters to resume the current
854
 * session.
855
 */
856
857
/* Note that the security parameters structure is set up after the
858
 * handshake has finished. The only value you may depend on while
859
 * the handshake is in progress is the cipher suite value.
860
 */
861
typedef struct {
862
  unsigned int entity; /* GNUTLS_SERVER or GNUTLS_CLIENT */
863
864
  /* The epoch used to read and write */
865
  uint16_t epoch_read;
866
  uint16_t epoch_write;
867
868
  /* The epoch that the next handshake will initialize. */
869
  uint16_t epoch_next;
870
871
  /* The epoch at index 0 of record_parameters. */
872
  uint16_t epoch_min;
873
874
  /* this is the ciphersuite we are going to use
875
   * moved here from internals in order to be restored
876
   * on resume;
877
   */
878
  const struct gnutls_cipher_suite_entry_st *cs;
879
880
  /* This is kept outside the ciphersuite entry as on certain
881
   * TLS versions we need a separate PRF MAC, i.e., MD5_SHA1. */
882
  const mac_entry_st *prf;
883
884
  uint8_t master_secret[GNUTLS_MASTER_SIZE];
885
  uint8_t client_random[GNUTLS_RANDOM_SIZE];
886
  uint8_t server_random[GNUTLS_RANDOM_SIZE];
887
  uint8_t session_id[GNUTLS_MAX_SESSION_ID_SIZE];
888
  uint8_t session_id_size;
889
  time_t timestamp;
890
891
  /* whether client has agreed in post handshake auth - only set on server side */
892
  uint8_t post_handshake_auth;
893
894
  /* The maximum amount of plaintext sent in a record,
895
   * negotiated with the peer.
896
   */
897
  uint16_t max_record_send_size;
898
  uint16_t max_record_recv_size;
899
900
  /* The maximum amount of plaintext sent in a record, set by
901
   * the programmer.
902
   */
903
  uint16_t max_user_record_send_size;
904
  uint16_t max_user_record_recv_size;
905
906
  /* The maximum amount of early data */
907
  uint32_t max_early_data_size;
908
909
  /* holds the negotiated certificate types */
910
  gnutls_certificate_type_t client_ctype;
911
  gnutls_certificate_type_t server_ctype;
912
913
  /* The selected (after server hello EC or DH group */
914
  const gnutls_group_entry_st *grp;
915
916
  /* Holds the signature algorithm that will be used in this session,
917
   * selected by the server at the time of Ciphersuite/certificate
918
   * selection - see select_sign_algorithm() */
919
  gnutls_sign_algorithm_t server_sign_algo;
920
921
  /* Holds the signature algorithm used in this session - If any */
922
  gnutls_sign_algorithm_t client_sign_algo;
923
924
  /* Whether the master secret negotiation will be according to
925
   * draft-ietf-tls-session-hash-01
926
   */
927
  uint8_t ext_master_secret;
928
  /* encrypt-then-mac -> rfc7366 */
929
  uint8_t etm;
930
931
  uint8_t client_auth_type; /* gnutls_credentials_type_t */
932
  uint8_t server_auth_type;
933
934
  /* Note: if you add anything in Security_Parameters struct, then
935
   * also modify CPY_COMMON in constate.c, and session_pack.c,
936
   * in order to save it in the session storage.
937
   */
938
939
  /* Used by extensions that enable supplemental data: Which ones
940
   * do that? Do they belong in security parameters?
941
   */
942
  int do_recv_supplemental, do_send_supplemental;
943
  const version_entry_st *pversion;
944
} security_parameters_st;
945
946
typedef struct api_aead_cipher_hd_st {
947
  cipher_hd_st ctx_enc;
948
} api_aead_cipher_hd_st;
949
950
struct record_state_st {
951
  /* mac keys can be as long as the hash size */
952
  uint8_t mac_key[MAX_HASH_SIZE];
953
  unsigned mac_key_size;
954
955
  uint8_t iv[MAX_CIPHER_IV_SIZE];
956
  unsigned iv_size;
957
958
  uint8_t key[MAX_CIPHER_KEY_SIZE];
959
  unsigned key_size;
960
961
  union {
962
    auth_cipher_hd_st tls12;
963
    api_aead_cipher_hd_st aead;
964
  } ctx;
965
  unsigned aead_tag_size;
966
  unsigned is_aead;
967
  uint64_t sequence_number;
968
  gnutls_record_encryption_level_t level;
969
};
970
971
/* These are used to resolve relative epochs. These values are just
972
   outside the 16 bit range to prevent off-by-one errors. An absolute
973
   epoch may be referred to by its numeric id in the range
974
   0x0000-0xffff. */
975
0
#define EPOCH_READ_CURRENT 70000
976
0
#define EPOCH_WRITE_CURRENT 70001
977
0
#define EPOCH_NEXT 70002
978
979
struct record_parameters_st {
980
  uint16_t epoch;
981
  int initialized;
982
983
  const cipher_entry_st *cipher;
984
  bool etm;
985
  const mac_entry_st *mac;
986
987
  /* for DTLS sliding window */
988
  uint64_t dtls_sw_next; /* The end point (next expected packet) of the sliding window without epoch */
989
  uint64_t dtls_sw_bits;
990
  unsigned dtls_sw_have_recv; /* whether at least a packet has been received */
991
992
  record_state_st read;
993
  record_state_st write;
994
995
  /* Whether this state is in use, i.e., if there is
996
     a pending handshake message waiting to be encrypted
997
     under this epoch's parameters.
998
   */
999
  int usage_cnt;
1000
};
1001
1002
typedef struct {
1003
  unsigned int priorities[MAX_ALGOS];
1004
  unsigned int num_priorities;
1005
} priority_st;
1006
1007
typedef enum {
1008
  SR_DISABLED,
1009
  SR_UNSAFE,
1010
  SR_PARTIAL,
1011
  SR_SAFE
1012
} safe_renegotiation_t;
1013
1014
0
#define MAX_CIPHERSUITE_SIZE 256
1015
1016
typedef struct ciphersuite_list_st {
1017
  const gnutls_cipher_suite_entry_st *entry[MAX_CIPHERSUITE_SIZE];
1018
  unsigned int size;
1019
} ciphersuite_list_st;
1020
1021
typedef struct group_list_st {
1022
  const gnutls_group_entry_st *entry[MAX_ALGOS];
1023
  unsigned int size;
1024
  bool have_ffdhe;
1025
} group_list_st;
1026
1027
typedef struct sign_algo_list_st {
1028
  const struct gnutls_sign_entry_st *entry[MAX_ALGOS];
1029
  unsigned int size;
1030
} sign_algo_list_st;
1031
1032
#include "atomic.h"
1033
1034
typedef enum ext_master_secret_t {
1035
  EMS_REQUEST,
1036
  EMS_REQUIRE
1037
} ext_master_secret_t;
1038
1039
/* For the external api */
1040
struct gnutls_priority_st {
1041
  priority_st protocol;
1042
  priority_st client_ctype;
1043
  priority_st server_ctype;
1044
1045
  /* The following are not necessary to be stored in
1046
   * the structure; however they are required by the
1047
   * external APIs: gnutls_priority_*_list() */
1048
  priority_st _cipher;
1049
  priority_st _mac;
1050
  priority_st _kx;
1051
  priority_st _sign_algo;
1052
  priority_st _supported_ecc;
1053
1054
  /* the supported groups */
1055
  group_list_st groups;
1056
1057
  /* the supported signature algorithms */
1058
  sign_algo_list_st sigalg;
1059
1060
  /* the supported ciphersuites */
1061
  ciphersuite_list_st cs;
1062
1063
  /* to disable record padding */
1064
  bool no_extensions;
1065
1066
  /* to disable extensions shuffling */
1067
  bool no_shuffle_extensions;
1068
1069
  safe_renegotiation_t sr;
1070
  bool min_record_version;
1071
  bool server_precedence;
1072
  bool allow_server_key_usage_violation; /* for test suite purposes only */
1073
  bool no_status_request;
1074
  bool no_tickets;
1075
  bool no_tickets_tls12;
1076
  bool have_cbc;
1077
  bool have_psk;
1078
  bool force_etm;
1079
  unsigned int additional_verify_flags;
1080
  bool tls13_compat_mode;
1081
  ext_master_secret_t force_ext_master_secret;
1082
1083
  /* TLS_FALLBACK_SCSV */
1084
  bool fallback;
1085
1086
  /* The session's expected security level.
1087
   * Will be used to determine the minimum DH bits,
1088
   * (or the acceptable certificate security level).
1089
   */
1090
  gnutls_sec_param_t level;
1091
1092
  /* these should be accessed from
1093
   * session->internals.VAR names */
1094
  bool _allow_large_records;
1095
  bool _allow_small_records;
1096
  bool _no_etm;
1097
  bool _no_ext_master_secret;
1098
  bool _allow_key_usage_violation;
1099
  bool _dumbfw;
1100
  unsigned int _dh_prime_bits; /* old (deprecated) variable */
1101
1102
  DEF_ATOMIC_INT(usage_cnt);
1103
};
1104
1105
/* Allow around 50KB of length-hiding padding
1106
 * when using legacy padding,
1107
 * or around 3.2MB when using new padding. */
1108
0
#define DEFAULT_MAX_EMPTY_RECORDS 200
1109
1110
#define ENABLE_COMPAT(x)                    \
1111
0
  (x)->allow_large_records = 1;       \
1112
0
  (x)->allow_small_records = 1;       \
1113
0
  (x)->no_etm = 1;                    \
1114
0
  (x)->no_ext_master_secret = 1;      \
1115
0
  (x)->allow_key_usage_violation = 1; \
1116
0
  (x)->dumbfw = 1
1117
1118
#define ENABLE_PRIO_COMPAT(x)                \
1119
0
  (x)->_allow_large_records = 1;       \
1120
0
  (x)->_allow_small_records = 1;       \
1121
0
  (x)->_no_etm = 1;                    \
1122
0
  (x)->_no_ext_master_secret = 1;      \
1123
0
  (x)->_allow_key_usage_violation = 1; \
1124
0
  (x)->_dumbfw = 1
1125
1126
/* DH and RSA parameters types.
1127
 */
1128
typedef struct gnutls_dh_params_int {
1129
  /* [0] is the prime, [1] is the generator, [2] is Q if available.
1130
   */
1131
  bigint_t params[3];
1132
  int q_bits; /* length of q in bits. If zero then length is unknown.
1133
         */
1134
} dh_params_st;
1135
1136
/* TLS 1.3 session ticket
1137
 */
1138
typedef struct {
1139
  struct timespec arrival_time;
1140
  struct timespec creation_time;
1141
  uint32_t lifetime;
1142
  uint32_t age_add;
1143
  uint8_t nonce[255];
1144
  size_t nonce_size;
1145
  const mac_entry_st *prf;
1146
  uint8_t resumption_master_secret[MAX_HASH_SIZE];
1147
  gnutls_datum_t ticket;
1148
} tls13_ticket_st;
1149
1150
/* DTLS session state
1151
 */
1152
typedef struct {
1153
  /* HelloVerifyRequest DOS prevention cookie */
1154
  gnutls_datum_t dcookie;
1155
1156
  /* For DTLS handshake fragmentation and reassembly. */
1157
  uint16_t hsk_write_seq;
1158
  /* the sequence number of the expected packet */
1159
  unsigned int hsk_read_seq;
1160
  uint16_t mtu;
1161
1162
  /* a flight transmission is in process */
1163
  bool flight_init;
1164
  /* whether this is the last flight in the protocol  */
1165
  bool last_flight;
1166
1167
  /* the retransmission timeout in milliseconds */
1168
  unsigned int retrans_timeout_ms;
1169
1170
  unsigned int hsk_hello_verify_requests;
1171
1172
  /* The actual retrans_timeout for the next message (e.g. doubled or so)
1173
   */
1174
  unsigned int actual_retrans_timeout_ms;
1175
1176
  /* timers to handle async handshake after gnutls_handshake()
1177
   * has terminated. Required to handle retransmissions.
1178
   */
1179
  time_t async_term;
1180
1181
  /* last retransmission triggered by record layer */
1182
  struct timespec last_retransmit;
1183
  unsigned int packets_dropped;
1184
} dtls_st;
1185
1186
typedef struct tfo_st {
1187
  int fd;
1188
  int flags;
1189
  bool connect_only; /* a previous sendmsg() failed, attempting connect() */
1190
  struct sockaddr_storage connect_addr;
1191
  socklen_t connect_addrlen;
1192
} tfo_st;
1193
1194
typedef struct {
1195
  /* holds all the parsed data received by the record layer */
1196
  mbuffer_head_st record_buffer;
1197
1198
  int handshake_hash_buffer_prev_len; /* keeps the length of handshake_hash_buffer, excluding
1199
             * the last received message */
1200
  unsigned handshake_hash_buffer_client_hello_len; /* if non-zero it is the length of data until the client hello message */
1201
  unsigned handshake_hash_buffer_client_kx_len; /* if non-zero it is the length of data until the
1202
               * the client key exchange message */
1203
  unsigned handshake_hash_buffer_server_finished_len; /* if non-zero it is the length of data until the
1204
                 * the server finished message */
1205
  unsigned handshake_hash_buffer_client_finished_len; /* if non-zero it is the length of data until the
1206
                 * the client finished message */
1207
  gnutls_buffer_st
1208
    handshake_hash_buffer; /* used to keep the last received handshake
1209
             * message */
1210
1211
  bool resumable; /* if we can resume that session */
1212
1213
  send_ticket_state_t
1214
    ticket_state; /* used by gnutls_session_ticket_send() */
1215
  bye_state_t bye_state; /* used by gnutls_bye() */
1216
  reauth_state_t reauth_state; /* used by gnutls_reauth() */
1217
1218
  handshake_state_t handshake_final_state;
1219
  handshake_state_t handshake_state; /* holds
1220
             * a number which indicates where
1221
             * the handshake procedure has been
1222
             * interrupted. If it is 0 then
1223
             * no interruption has happened.
1224
             */
1225
1226
  bool invalid_connection; /* if this session is valid */
1227
1228
  bool may_not_read; /* if it's 0 then we can read/write, otherwise it's forbidden to read/write
1229
         */
1230
  bool may_not_write;
1231
  bool read_eof; /* non-zero if we have received a closure alert. */
1232
1233
  int last_alert; /* last alert received */
1234
1235
  /* The last handshake messages sent or received.
1236
   */
1237
  int last_handshake_in;
1238
  int last_handshake_out;
1239
1240
  /* priorities */
1241
  struct gnutls_priority_st *priorities;
1242
1243
  /* variables directly set when setting the priorities above, or
1244
   * when overriding them */
1245
  bool allow_large_records;
1246
  bool allow_small_records;
1247
  bool no_etm;
1248
  bool no_ext_master_secret;
1249
  bool allow_key_usage_violation;
1250
  bool dumbfw;
1251
1252
  /* old (deprecated) variable. This is used for both srp_prime_bits
1253
   * and dh_prime_bits as they don't overlap */
1254
  /* For SRP: minimum bits to allow for SRP
1255
   * use gnutls_srp_set_prime_bits() to adjust it.
1256
   */
1257
  uint16_t dh_prime_bits; /* srp_prime_bits */
1258
1259
  /* resumed session */
1260
  bool resumed; /* if we are resuming a session */
1261
1262
  /* server side: non-zero if resumption was requested by client
1263
   * client side: non-zero if we set resumption parameters */
1264
  bool resumption_requested;
1265
  security_parameters_st resumed_security_parameters;
1266
  gnutls_datum_t
1267
    resumption_data; /* copy of input to gnutls_session_set_data() */
1268
1269
  /* These buffers are used in the handshake
1270
   * protocol only. freed using _gnutls_handshake_io_buffer_clear();
1271
   */
1272
  mbuffer_head_st handshake_send_buffer;
1273
  mbuffer_head_st handshake_header_recv_buffer;
1274
  handshake_buffer_st handshake_recv_buffer[MAX_HANDSHAKE_MSGS];
1275
  int handshake_recv_buffer_size;
1276
1277
  /* this buffer holds a record packet -mostly used for
1278
   * non blocking IO.
1279
   */
1280
  mbuffer_head_st
1281
    record_recv_buffer; /* buffer holding the unparsed record that is currently
1282
             * being received */
1283
  mbuffer_head_st record_send_buffer; /* holds cached data
1284
             * for the gnutls_io_write_buffered()
1285
             * function.
1286
             */
1287
  size_t record_send_buffer_user_size; /* holds the
1288
             * size of the user specified data to
1289
             * send.
1290
             */
1291
1292
  mbuffer_head_st early_data_recv_buffer;
1293
  gnutls_buffer_st early_data_presend_buffer;
1294
1295
  record_send_state_t rsend_state;
1296
  /* buffer used temporarily during key update */
1297
  gnutls_buffer_st record_key_update_buffer;
1298
  gnutls_buffer_st record_presend_buffer; /* holds cached data
1299
             * for the gnutls_record_send()
1300
             * function.
1301
             */
1302
1303
  /* buffer used temporarily during TLS1.3 reauthentication */
1304
  gnutls_buffer_st reauth_buffer;
1305
1306
  time_t expire_time; /* after expire_time seconds this session will expire */
1307
  const struct mod_auth_st_int
1308
    *auth_struct; /* used in handshake packets and KX algorithms */
1309
1310
  /* this is the highest version available
1311
   * to the peer. (advertised version).
1312
   * This is obtained by the Handshake Client Hello
1313
   * message. (some implementations read the Record version)
1314
   */
1315
  uint8_t adv_version_major;
1316
  uint8_t adv_version_minor;
1317
1318
  /* if this is non zero a certificate request message
1319
   * will be sent to the client. - only if the ciphersuite
1320
   * supports it. In server side it contains GNUTLS_CERT_REQUIRE
1321
   * or similar.
1322
   */
1323
  gnutls_certificate_request_t send_cert_req;
1324
1325
  /* callback to print the full path of certificate
1326
   * validation to the trusted root.
1327
   */
1328
  gnutls_verify_output_function *cert_output_callback;
1329
1330
  size_t max_handshake_data_buffer_size;
1331
1332
  /* PUSH & PULL functions.
1333
   */
1334
  gnutls_pull_timeout_func pull_timeout_func;
1335
  gnutls_pull_func pull_func;
1336
  gnutls_push_func push_func;
1337
  gnutls_vec_push_func vec_push_func;
1338
  gnutls_errno_func errno_func;
1339
  /* Holds the first argument of PUSH and PULL
1340
   * functions;
1341
   */
1342
  gnutls_transport_ptr_t transport_recv_ptr;
1343
  gnutls_transport_ptr_t transport_send_ptr;
1344
1345
  /* STORE & RETRIEVE functions. Only used if other
1346
   * backend than gdbm is used.
1347
   */
1348
  gnutls_db_store_func db_store_func;
1349
  gnutls_db_retr_func db_retrieve_func;
1350
  gnutls_db_remove_func db_remove_func;
1351
  void *db_ptr;
1352
1353
  /* post client hello callback (server side only)
1354
   */
1355
  gnutls_handshake_post_client_hello_func user_hello_func;
1356
  /* handshake hook function */
1357
  gnutls_handshake_hook_func h_hook;
1358
  unsigned int h_type; /* the hooked type */
1359
  int16_t h_post; /* whether post-generation/receive */
1360
  gnutls_handshake_read_func h_read_func;
1361
  gnutls_handshake_secret_func h_secret_func;
1362
  gnutls_alert_read_func alert_read_func;
1363
1364
  gnutls_keylog_func keylog_func;
1365
1366
  /* holds the selected certificate and key.
1367
   * use _gnutls_selected_certs_deinit() and _gnutls_selected_certs_set()
1368
   * to change them.
1369
   */
1370
  gnutls_pcert_st *selected_cert_list;
1371
  uint16_t selected_cert_list_length;
1372
  struct gnutls_privkey_st *selected_key;
1373
1374
  /* new callbacks such as gnutls_certificate_retrieve_function3
1375
   * set the selected_ocsp datum values. The older OCSP callback-based
1376
   * functions, set the ocsp_func. The former takes precedence when
1377
   * set.
1378
   */
1379
  gnutls_ocsp_data_st *selected_ocsp;
1380
  uint16_t selected_ocsp_length;
1381
  gnutls_status_request_ocsp_func selected_ocsp_func;
1382
  void *selected_ocsp_func_ptr;
1383
  bool selected_need_free;
1384
1385
  /* This holds the default version that our first
1386
   * record packet will have. */
1387
  uint8_t default_record_version[2];
1388
  uint8_t default_hello_version[2];
1389
1390
  void *user_ptr;
1391
1392
  /* Holds 0 if the last called function was interrupted while
1393
   * receiving, and non zero otherwise.
1394
   */
1395
  bool direction;
1396
1397
  /* If non zero the server will not advertise the CA's he
1398
   * trusts (do not send an RDN sequence).
1399
   */
1400
  bool ignore_rdn_sequence;
1401
1402
  /* This is used to set an arbitrary version in the RSA
1403
   * PMS secret. Can be used by clients to test whether the
1404
   * server checks that version. (** only used in gnutls-cli-debug)
1405
   */
1406
  uint8_t rsa_pms_version[2];
1407
1408
  /* To avoid using global variables, and especially on Windows where
1409
   * the application may use a different errno variable than GnuTLS,
1410
   * it is possible to use gnutls_transport_set_errno to set a
1411
   * session-specific errno variable in the user-replaceable push/pull
1412
   * functions.  This value is used by the send/recv functions.  (The
1413
   * strange name of this variable is because 'errno' is typically
1414
   * #define'd.)
1415
   */
1416
  int errnum;
1417
1418
  /* A handshake process has been completed */
1419
  bool initial_negotiation_completed;
1420
  void *post_negotiation_lock; /* protects access to the variable above
1421
           * in the cases where negotiation is incomplete
1422
           * after gnutls_handshake() - early/false start */
1423
1424
  /* The type of transport protocol; stream or datagram */
1425
  transport_t transport;
1426
1427
  /* DTLS session state */
1428
  dtls_st dtls;
1429
  /* Protect from infinite loops due to GNUTLS_E_LARGE_PACKET non-handling
1430
   * or due to multiple alerts being received. */
1431
  unsigned handshake_suspicious_loops;
1432
  /* should be non-zero when a handshake is in progress */
1433
  bool handshake_in_progress;
1434
1435
  /* if set it means that the master key was set using
1436
   * gnutls_session_set_master() rather than being negotiated. */
1437
  bool premaster_set;
1438
1439
  unsigned int cb_tls_unique_len;
1440
  unsigned char cb_tls_unique[MAX_VERIFY_DATA_SIZE];
1441
1442
  /* starting time of current handshake */
1443
  struct timespec handshake_start_time;
1444
1445
  /* expected end time of current handshake (start+timeout);
1446
   * this is only filled if a handshake_time_ms is set. */
1447
  struct timespec handshake_abs_timeout;
1448
1449
  /* An estimation of round-trip time under TLS1.3; populated in client side only */
1450
  unsigned ertt;
1451
1452
  unsigned int handshake_timeout_ms; /* timeout in milliseconds */
1453
  unsigned int record_timeout_ms; /* timeout in milliseconds */
1454
1455
  /* saved context of post handshake certificate request. In
1456
   * client side is what we received in server's certificate request;
1457
   * in server side is what we sent to client. */
1458
  gnutls_datum_t post_handshake_cr_context;
1459
  /* it is a copy of the handshake hash buffer if post handshake is used */
1460
  gnutls_buffer_st post_handshake_hash_buffer;
1461
1462
/* When either of PSK or DHE-PSK is received */
1463
#define HSK_PSK_KE_MODES_RECEIVED                        \
1464
0
  (HSK_PSK_KE_MODE_PSK | HSK_PSK_KE_MODE_DHE_PSK | \
1465
0
   HSK_PSK_KE_MODE_INVALID)
1466
1467
0
#define HSK_CRT_VRFY_EXPECTED 1
1468
0
#define HSK_CRT_ASKED (1 << 2)
1469
0
#define HSK_HRR_SENT (1 << 3)
1470
0
#define HSK_HRR_RECEIVED (1 << 4)
1471
0
#define HSK_CRT_REQ_SENT (1 << 5)
1472
#define HSK_COMP_CRT_REQ_SENT \
1473
0
  (1 << 6) /* whether certificate compression has been requested */
1474
0
#define HSK_KEY_UPDATE_ASKED (1 << 7) /* flag is not used during handshake */
1475
0
#define HSK_FALSE_START_USED (1 << 8) /* TLS1.2 only */
1476
#define HSK_HAVE_FFDHE \
1477
0
  (1 << 9) /* whether the peer has advertised at least an FFDHE group */
1478
#define HSK_USED_FFDHE \
1479
0
  (1 << 10) /* whether ffdhe was actually negotiated and used */
1480
0
#define HSK_PSK_KE_MODES_SENT (1 << 11)
1481
#define HSK_PSK_KE_MODE_PSK \
1482
0
  (1 << 12) /* client: whether PSK without DH is allowed,
1483
           * server: whether PSK without DH is selected. */
1484
#define HSK_PSK_KE_MODE_INVALID \
1485
0
  (1 << 13) /* server: no compatible PSK modes were seen */
1486
#define HSK_PSK_KE_MODE_DHE_PSK \
1487
0
  (1 << 14) /* server: whether PSK with DH is selected
1488
           * client: whether PSK with DH is allowed
1489
           */
1490
#define HSK_PSK_SELECTED \
1491
0
  (1               \
1492
0
   << 15) /* server: whether PSK was selected, either for resumption or not;
1493
           *         on resumption session->internals.resumed will be set as well.
1494
           * client: the same */
1495
0
#define HSK_KEY_SHARE_SENT (1 << 16) /* server: key share was sent to client */
1496
#define HSK_KEY_SHARE_RECEIVED \
1497
0
  (1 << 17) /* client: key share was received
1498
           * server: key share was received and accepted */
1499
#define HSK_TLS13_TICKET_SENT \
1500
0
  (1 << 18) /* client: sent a ticket under TLS1.3;
1501
           * server: a ticket was sent to client.
1502
           */
1503
#define HSK_TLS12_TICKET_SENT \
1504
0
  (1 << 19) /* client: sent a ticket under TLS1.2;
1505
           * server: a ticket was sent to client.
1506
           */
1507
#define HSK_TICKET_RECEIVED \
1508
0
  (1 << 20) /* client: a session ticket was received */
1509
0
#define HSK_EARLY_START_USED (1 << 21)
1510
#define HSK_EARLY_DATA_IN_FLIGHT \
1511
0
  (1 << 22) /* client: sent early_data extension in ClientHello
1512
             * server: early_data extension was seen in ClientHello
1513
             */
1514
#define HSK_EARLY_DATA_ACCEPTED \
1515
0
  (1                      \
1516
0
   << 23) /* client: early_data extension was seen in EncryptedExtensions
1517
           * server: intend to process early data
1518
           */
1519
0
#define HSK_RECORD_SIZE_LIMIT_NEGOTIATED (1 << 24)
1520
#define HSK_RECORD_SIZE_LIMIT_SENT \
1521
0
  (1 << 25) /* record_size_limit extension was sent */
1522
#define HSK_RECORD_SIZE_LIMIT_RECEIVED \
1523
0
  (1                             \
1524
0
   << 26) /* server: record_size_limit extension was seen but not accepted yet */
1525
#define HSK_OCSP_REQUESTED \
1526
0
  (1 << 27) /* server: client requested OCSP stapling */
1527
#define HSK_CLIENT_OCSP_REQUESTED \
1528
0
  (1 << 28) /* client: server requested OCSP stapling */
1529
#define HSK_SERVER_HELLO_RECEIVED \
1530
0
  (1 << 29) /* client: Server Hello message has been received */
1531
1532
  /* The hsk_flags are for use within the ongoing handshake;
1533
   * they are reset to zero prior to handshake start by gnutls_handshake. */
1534
  unsigned hsk_flags;
1535
  struct timespec last_key_update;
1536
  unsigned key_update_count;
1537
  /* Read-only pointer to the full ClientHello message */
1538
  gnutls_buffer_st full_client_hello;
1539
  /* The offset at which extensions start in the ClientHello buffer */
1540
  int extensions_offset;
1541
1542
  gnutls_buffer_st hb_local_data;
1543
  gnutls_buffer_st hb_remote_data;
1544
  struct timespec
1545
    hb_ping_start; /* timestamp: when first HeartBeat ping was sent */
1546
  struct timespec
1547
    hb_ping_sent; /* timestamp: when last HeartBeat ping was sent */
1548
  unsigned int
1549
    hb_actual_retrans_timeout_ms; /* current timeout, in milliseconds */
1550
  unsigned int
1551
    hb_retrans_timeout_ms; /* the default timeout, in milliseconds */
1552
  unsigned int hb_total_timeout_ms; /* the total timeout, in milliseconds */
1553
1554
  bool ocsp_check_ok; /* will be zero if the OCSP response TLS extension
1555
         * check failed (OCSP was old/unrelated or so). */
1556
1557
  heartbeat_state_t hb_state; /* for ping */
1558
1559
  recv_state_t recv_state; /* state of the receive function */
1560
1561
  /* if set, server and client random were set by the application */
1562
  bool sc_random_set;
1563
1564
0
#define INT_FLAG_NO_TLS13 (1LL << 60)
1565
  uint64_t flags; /* the flags in gnutls_init() and GNUTLS_INT_FLAGS */
1566
1567
  /* a verify callback to override the verify callback from the credentials
1568
   * structure */
1569
  gnutls_certificate_verify_function *verify_callback;
1570
  gnutls_typed_vdata_st *vc_data;
1571
  gnutls_typed_vdata_st vc_sdata;
1572
  unsigned vc_elements;
1573
  unsigned vc_status;
1574
  unsigned int
1575
    additional_verify_flags; /* may be set by priorities or the vc functions */
1576
1577
  /* we append the verify flags because these can be set,
1578
   * either by this function or by gnutls_session_set_verify_cert().
1579
   * However, we ensure that a single profile is set. */
1580
#define ADD_PROFILE_VFLAGS(session, vflags)                           \
1581
0
  do {                                                          \
1582
0
    if ((session->internals.additional_verify_flags &     \
1583
0
         GNUTLS_VFLAGS_PROFILE_MASK) &&                   \
1584
0
        (vflags & GNUTLS_VFLAGS_PROFILE_MASK))            \
1585
0
      session->internals.additional_verify_flags &= \
1586
0
        ~GNUTLS_VFLAGS_PROFILE_MASK;          \
1587
0
    session->internals.additional_verify_flags |= vflags; \
1588
0
  } while (0)
1589
1590
  /* the SHA256 hash of the peer's certificate */
1591
  uint8_t cert_hash[32];
1592
  bool cert_hash_set;
1593
1594
  /* The saved username from PSK or SRP auth */
1595
  char *saved_username;
1596
  /* Length of the saved username without the NULL terminating byte.
1597
   * Must be set to -1 when saved username is NULL
1598
   */
1599
  int saved_username_size;
1600
1601
  /* Needed for TCP Fast Open (TFO), set by gnutls_transport_set_fastopen() */
1602
  tfo_st tfo;
1603
1604
  struct gnutls_supplemental_entry_st *rsup;
1605
  unsigned rsup_size;
1606
1607
  struct hello_ext_entry_st *rexts;
1608
  unsigned rexts_size;
1609
1610
  struct { /* ext_data[id] contains data for extension_t id */
1611
    gnutls_ext_priv_data_t priv;
1612
    gnutls_ext_priv_data_t resumed_priv;
1613
    uint8_t set;
1614
    uint8_t resumed_set;
1615
  } ext_data[MAX_EXT_TYPES];
1616
1617
  /* In case of a client holds the extensions we sent to the peer;
1618
   * otherwise the extensions we received from the client. This is
1619
   * an OR of (1<<extensions_t values).
1620
   */
1621
  ext_track_t used_exts;
1622
1623
  gnutls_ext_flags_t
1624
    ext_msg; /* accessed through _gnutls_ext_get/set_msg() */
1625
1626
  /* this is not the negotiated max_record_recv_size, but the actual maximum
1627
   * receive size */
1628
  unsigned max_recv_size;
1629
1630
  /* candidate groups to be selected for security params groups, they are
1631
   * prioritized in isolation under TLS1.2 */
1632
  const gnutls_group_entry_st *cand_ec_group;
1633
  const gnutls_group_entry_st *cand_dh_group;
1634
  /* used under TLS1.3+ */
1635
  const gnutls_group_entry_st *cand_group;
1636
1637
  /* the ciphersuite received in HRR */
1638
  uint8_t hrr_cs[2];
1639
1640
  /* this is only used under TLS1.2 or earlier */
1641
  int session_ticket_renew;
1642
1643
  tls13_ticket_st tls13_ticket;
1644
1645
  /* the amount of early data received so far */
1646
  uint32_t early_data_received;
1647
1648
  /* anti-replay measure for 0-RTT mode */
1649
  gnutls_anti_replay_t anti_replay;
1650
1651
  /* Protects _gnutls_epoch_gc() from _gnutls_epoch_get(); these may be
1652
   * called in parallel when false start is used and false start is used. */
1653
  void *epoch_lock;
1654
1655
  /* indicates whether or not was KTLS initialized properly. */
1656
  int ktls_enabled;
1657
1658
  /* Compression method for certificate compression */
1659
  gnutls_compression_method_t compress_certificate_method;
1660
1661
  /* If you add anything here, check _gnutls_handshake_internal_state_clear().
1662
   */
1663
} internals_st;
1664
1665
/* Maximum number of epochs we keep around. */
1666
0
#define MAX_EPOCH_INDEX 4
1667
1668
#define reset_cand_groups(session)                                            \
1669
0
  session->internals.cand_ec_group = session->internals.cand_dh_group = \
1670
0
    session->internals.cand_group = NULL
1671
1672
struct gnutls_session_int {
1673
  security_parameters_st security_parameters;
1674
  record_parameters_st *record_parameters[MAX_EPOCH_INDEX];
1675
  internals_st internals;
1676
  gnutls_key_st key;
1677
};
1678
1679
/* functions
1680
 */
1681
void _gnutls_free_auth_info(gnutls_session_t session);
1682
1683
/* These two macros return the advertised TLS version of
1684
 * the peer.
1685
 */
1686
#define _gnutls_get_adv_version_major(session) \
1687
0
  session->internals.adv_version_major
1688
1689
#define _gnutls_get_adv_version_minor(session) \
1690
0
  session->internals.adv_version_minor
1691
1692
#define set_adv_version(session, major, minor)        \
1693
0
  session->internals.adv_version_major = major; \
1694
0
  session->internals.adv_version_minor = minor
1695
1696
int _gnutls_is_secure_mem_null(const void *);
1697
1698
inline static const version_entry_st *get_version(gnutls_session_t session)
1699
0
{
1700
0
  return session->security_parameters.pversion;
1701
0
}
Unexecuted instantiation: record.c:get_version
Unexecuted instantiation: debug.c:get_version
Unexecuted instantiation: cipher.c:get_version
Unexecuted instantiation: handshake-tls13.c:get_version
Unexecuted instantiation: mbuffers.c:get_version
Unexecuted instantiation: buffers.c:get_version
Unexecuted instantiation: handshake.c:get_version
Unexecuted instantiation: errors.c:get_version
Unexecuted instantiation: kx.c:get_version
Unexecuted instantiation: cipher-cbc.c:get_version
Unexecuted instantiation: priority.c:get_version
Unexecuted instantiation: hash_int.c:get_version
Unexecuted instantiation: cipher_int.c:get_version
Unexecuted instantiation: session.c:get_version
Unexecuted instantiation: db.c:get_version
Unexecuted instantiation: hello_ext.c:get_version
Unexecuted instantiation: auth.c:get_version
Unexecuted instantiation: sslv2_compat.c:get_version
Unexecuted instantiation: datum.c:get_version
Unexecuted instantiation: session_pack.c:get_version
Unexecuted instantiation: cert-cred.c:get_version
Unexecuted instantiation: global.c:get_version
Unexecuted instantiation: constate.c:get_version
Unexecuted instantiation: mem.c:get_version
Unexecuted instantiation: alert.c:get_version
Unexecuted instantiation: threads.c:get_version
Unexecuted instantiation: sockets.c:get_version
Unexecuted instantiation: system.c:get_version
Unexecuted instantiation: profiles.c:get_version
Unexecuted instantiation: str.c:get_version
Unexecuted instantiation: str-idna.c:get_version
Unexecuted instantiation: state.c:get_version
Unexecuted instantiation: cert-cred-x509.c:get_version
Unexecuted instantiation: supplemental.c:get_version
Unexecuted instantiation: random.c:get_version
Unexecuted instantiation: crypto-api.c:get_version
Unexecuted instantiation: privkey.c:get_version
Unexecuted instantiation: pcert.c:get_version
Unexecuted instantiation: pubkey.c:get_version
Unexecuted instantiation: dtls.c:get_version
Unexecuted instantiation: system_override.c:get_version
Unexecuted instantiation: crypto-backend.c:get_version
Unexecuted instantiation: fips.c:get_version
Unexecuted instantiation: safe-memfuncs.c:get_version
Unexecuted instantiation: atfork.c:get_version
Unexecuted instantiation: urls.c:get_version
Unexecuted instantiation: prf.c:get_version
Unexecuted instantiation: dh-session.c:get_version
Unexecuted instantiation: cert-session.c:get_version
Unexecuted instantiation: handshake-checks.c:get_version
Unexecuted instantiation: dtls-sw.c:get_version
Unexecuted instantiation: secrets.c:get_version
Unexecuted instantiation: extv.c:get_version
Unexecuted instantiation: ocsp-api.c:get_version
Unexecuted instantiation: iov.c:get_version
Unexecuted instantiation: ktls.c:get_version
Unexecuted instantiation: keys-dummy.c:get_version
Unexecuted instantiation: encrypted_extensions.c:get_version
Unexecuted instantiation: certificate_request.c:get_version
Unexecuted instantiation: certificate_verify.c:get_version
Unexecuted instantiation: tls13-sig.c:get_version
Unexecuted instantiation: finished.c:get_version
Unexecuted instantiation: key_update.c:get_version
Unexecuted instantiation: hello_retry.c:get_version
Unexecuted instantiation: session_ticket.c:get_version
Unexecuted instantiation: certificate.c:get_version
Unexecuted instantiation: early_data.c:get_version
Unexecuted instantiation: post_handshake.c:get_version
Unexecuted instantiation: common.c:get_version
Unexecuted instantiation: crl.c:get_version
Unexecuted instantiation: crq.c:get_version
Unexecuted instantiation: dn.c:get_version
Unexecuted instantiation: extensions.c:get_version
Unexecuted instantiation: hostname-verify.c:get_version
Unexecuted instantiation: key_decode.c:get_version
Unexecuted instantiation: key_encode.c:get_version
Unexecuted instantiation: mpi.c:get_version
Unexecuted instantiation: ocsp.c:get_version
Unexecuted instantiation: output.c:get_version
Unexecuted instantiation: pkcs12.c:get_version
Unexecuted instantiation: pkcs12_bag.c:get_version
Unexecuted instantiation: pkcs12_encr.c:get_version
Unexecuted instantiation: pkcs7-crypt.c:get_version
Unexecuted instantiation: privkey_openssl.c:get_version
Unexecuted instantiation: privkey_pkcs8.c:get_version
Unexecuted instantiation: privkey_pkcs8_pbes1.c:get_version
Unexecuted instantiation: prov-seed.c:get_version
Unexecuted instantiation: sign.c:get_version
Unexecuted instantiation: spki.c:get_version
Unexecuted instantiation: time.c:get_version
Unexecuted instantiation: tls_features.c:get_version
Unexecuted instantiation: verify-high.c:get_version
Unexecuted instantiation: verify-high2.c:get_version
Unexecuted instantiation: verify.c:get_version
Unexecuted instantiation: virt-san.c:get_version
Unexecuted instantiation: x509.c:get_version
Unexecuted instantiation: x509_dn.c:get_version
Unexecuted instantiation: x509_ext.c:get_version
Unexecuted instantiation: x509_write.c:get_version
Unexecuted instantiation: alpn.c:get_version
Unexecuted instantiation: client_cert_type.c:get_version
Unexecuted instantiation: compress_certificate.c:get_version
Unexecuted instantiation: cookie.c:get_version
Unexecuted instantiation: dumbfw.c:get_version
Unexecuted instantiation: ec_point_formats.c:get_version
Unexecuted instantiation: etm.c:get_version
Unexecuted instantiation: ext_master_secret.c:get_version
Unexecuted instantiation: heartbeat.c:get_version
Unexecuted instantiation: key_share.c:get_version
Unexecuted instantiation: max_record.c:get_version
Unexecuted instantiation: pre_shared_key.c:get_version
Unexecuted instantiation: psk_ke_modes.c:get_version
Unexecuted instantiation: record_size_limit.c:get_version
Unexecuted instantiation: safe_renegotiation.c:get_version
Unexecuted instantiation: server_cert_type.c:get_version
Unexecuted instantiation: server_name.c:get_version
Unexecuted instantiation: signature.c:get_version
Unexecuted instantiation: srtp.c:get_version
Unexecuted instantiation: status_request.c:get_version
Unexecuted instantiation: supported_groups.c:get_version
Unexecuted instantiation: supported_versions.c:get_version
Unexecuted instantiation: cert.c:get_version
Unexecuted instantiation: dh_common.c:get_version
Unexecuted instantiation: psk.c:get_version
Unexecuted instantiation: psk_passwd.c:get_version
Unexecuted instantiation: cert_types.c:get_version
Unexecuted instantiation: ciphers.c:get_version
Unexecuted instantiation: ciphersuites.c:get_version
Unexecuted instantiation: ecc.c:get_version
Unexecuted instantiation: groups.c:get_version
Unexecuted instantiation: mac.c:get_version
Unexecuted instantiation: protocols.c:get_version
Unexecuted instantiation: publickey.c:get_version
Unexecuted instantiation: secparams.c:get_version
Unexecuted instantiation: accelerated.c:get_version
Unexecuted instantiation: cryptodev.c:get_version
Unexecuted instantiation: x86-common.c:get_version
Unexecuted instantiation: gost28147.c:get_version
Unexecuted instantiation: init.c:get_version
Unexecuted instantiation: pk.c:get_version
Unexecuted instantiation: rnd.c:get_version
Unexecuted instantiation: rsa-keygen-fips186.c:get_version
Unexecuted instantiation: sysrng-linux.c:get_version
Unexecuted instantiation: tls1-prf.c:get_version
Unexecuted instantiation: compress.c:get_version
Unexecuted instantiation: dh.c:get_version
Unexecuted instantiation: x509_b64.c:get_version
Unexecuted instantiation: fingerprint.c:get_version
Unexecuted instantiation: tls-sig.c:get_version
Unexecuted instantiation: certs.c:get_version
Unexecuted instantiation: str-iconv.c:get_version
Unexecuted instantiation: str-unicode.c:get_version
Unexecuted instantiation: file.c:get_version
Unexecuted instantiation: pin.c:get_version
Unexecuted instantiation: dh-primes.c:get_version
Unexecuted instantiation: hello_ext_lib.c:get_version
Unexecuted instantiation: stek.c:get_version
Unexecuted instantiation: pathbuf.c:get_version
Unexecuted instantiation: psk_ext_parser.c:get_version
Unexecuted instantiation: anti_replay.c:get_version
Unexecuted instantiation: attributes.c:get_version
Unexecuted instantiation: email-verify.c:get_version
Unexecuted instantiation: ip.c:get_version
Unexecuted instantiation: krb5.c:get_version
Unexecuted instantiation: name_constraints.c:get_version
Unexecuted instantiation: anon.c:get_version
Unexecuted instantiation: anon_ecdh.c:get_version
Unexecuted instantiation: dhe.c:get_version
Unexecuted instantiation: dhe_psk.c:get_version
Unexecuted instantiation: ecdhe.c:get_version
Unexecuted instantiation: rsa.c:get_version
Unexecuted instantiation: rsa_psk.c:get_version
Unexecuted instantiation: vko_gost.c:get_version
Unexecuted instantiation: aes-cbc-x86-aesni.c:get_version
Unexecuted instantiation: aes-cbc-x86-ssse3.c:get_version
Unexecuted instantiation: aes-ccm-x86-aesni.c:get_version
Unexecuted instantiation: aes-gcm-padlock.c:get_version
Unexecuted instantiation: aes-gcm-x86-aesni.c:get_version
Unexecuted instantiation: aes-gcm-x86-pclmul-avx.c:get_version
Unexecuted instantiation: aes-gcm-x86-pclmul.c:get_version
Unexecuted instantiation: aes-gcm-x86-ssse3.c:get_version
Unexecuted instantiation: aes-padlock.c:get_version
Unexecuted instantiation: aes-xts-x86-aesni.c:get_version
Unexecuted instantiation: hmac-padlock.c:get_version
Unexecuted instantiation: hmac-x86-ssse3.c:get_version
Unexecuted instantiation: sha-padlock.c:get_version
Unexecuted instantiation: sha-x86-ssse3.c:get_version
Unexecuted instantiation: bignum-le.c:get_version
Unexecuted instantiation: dsa-compute-k.c:get_version
Unexecuted instantiation: dsa-keygen-fips186.c:get_version
Unexecuted instantiation: dsa-validate.c:get_version
Unexecuted instantiation: ecdsa-compute-k.c:get_version
Unexecuted instantiation: gostdsa-mask.c:get_version
Unexecuted instantiation: provable-prime.c:get_version
Unexecuted instantiation: vko.c:get_version
Unexecuted instantiation: gost_keywrap.c:get_version
Unexecuted instantiation: gost-wrap.c:get_version
1702
1703
inline static unsigned get_num_version(gnutls_session_t session)
1704
0
{
1705
0
  if (likely(session->security_parameters.pversion != NULL))
1706
0
    return session->security_parameters.pversion->id;
1707
0
  else
1708
0
    return GNUTLS_VERSION_UNKNOWN;
1709
0
}
Unexecuted instantiation: record.c:get_num_version
Unexecuted instantiation: debug.c:get_num_version
Unexecuted instantiation: cipher.c:get_num_version
Unexecuted instantiation: handshake-tls13.c:get_num_version
Unexecuted instantiation: mbuffers.c:get_num_version
Unexecuted instantiation: buffers.c:get_num_version
Unexecuted instantiation: handshake.c:get_num_version
Unexecuted instantiation: errors.c:get_num_version
Unexecuted instantiation: kx.c:get_num_version
Unexecuted instantiation: cipher-cbc.c:get_num_version
Unexecuted instantiation: priority.c:get_num_version
Unexecuted instantiation: hash_int.c:get_num_version
Unexecuted instantiation: cipher_int.c:get_num_version
Unexecuted instantiation: session.c:get_num_version
Unexecuted instantiation: db.c:get_num_version
Unexecuted instantiation: hello_ext.c:get_num_version
Unexecuted instantiation: auth.c:get_num_version
Unexecuted instantiation: sslv2_compat.c:get_num_version
Unexecuted instantiation: datum.c:get_num_version
Unexecuted instantiation: session_pack.c:get_num_version
Unexecuted instantiation: cert-cred.c:get_num_version
Unexecuted instantiation: global.c:get_num_version
Unexecuted instantiation: constate.c:get_num_version
Unexecuted instantiation: mem.c:get_num_version
Unexecuted instantiation: alert.c:get_num_version
Unexecuted instantiation: threads.c:get_num_version
Unexecuted instantiation: sockets.c:get_num_version
Unexecuted instantiation: system.c:get_num_version
Unexecuted instantiation: profiles.c:get_num_version
Unexecuted instantiation: str.c:get_num_version
Unexecuted instantiation: str-idna.c:get_num_version
Unexecuted instantiation: state.c:get_num_version
Unexecuted instantiation: cert-cred-x509.c:get_num_version
Unexecuted instantiation: supplemental.c:get_num_version
Unexecuted instantiation: random.c:get_num_version
Unexecuted instantiation: crypto-api.c:get_num_version
Unexecuted instantiation: privkey.c:get_num_version
Unexecuted instantiation: pcert.c:get_num_version
Unexecuted instantiation: pubkey.c:get_num_version
Unexecuted instantiation: dtls.c:get_num_version
Unexecuted instantiation: system_override.c:get_num_version
Unexecuted instantiation: crypto-backend.c:get_num_version
Unexecuted instantiation: fips.c:get_num_version
Unexecuted instantiation: safe-memfuncs.c:get_num_version
Unexecuted instantiation: atfork.c:get_num_version
Unexecuted instantiation: urls.c:get_num_version
Unexecuted instantiation: prf.c:get_num_version
Unexecuted instantiation: dh-session.c:get_num_version
Unexecuted instantiation: cert-session.c:get_num_version
Unexecuted instantiation: handshake-checks.c:get_num_version
Unexecuted instantiation: dtls-sw.c:get_num_version
Unexecuted instantiation: secrets.c:get_num_version
Unexecuted instantiation: extv.c:get_num_version
Unexecuted instantiation: ocsp-api.c:get_num_version
Unexecuted instantiation: iov.c:get_num_version
Unexecuted instantiation: ktls.c:get_num_version
Unexecuted instantiation: keys-dummy.c:get_num_version
Unexecuted instantiation: encrypted_extensions.c:get_num_version
Unexecuted instantiation: certificate_request.c:get_num_version
Unexecuted instantiation: certificate_verify.c:get_num_version
Unexecuted instantiation: tls13-sig.c:get_num_version
Unexecuted instantiation: finished.c:get_num_version
Unexecuted instantiation: key_update.c:get_num_version
Unexecuted instantiation: hello_retry.c:get_num_version
Unexecuted instantiation: session_ticket.c:get_num_version
Unexecuted instantiation: certificate.c:get_num_version
Unexecuted instantiation: early_data.c:get_num_version
Unexecuted instantiation: post_handshake.c:get_num_version
Unexecuted instantiation: common.c:get_num_version
Unexecuted instantiation: crl.c:get_num_version
Unexecuted instantiation: crq.c:get_num_version
Unexecuted instantiation: dn.c:get_num_version
Unexecuted instantiation: extensions.c:get_num_version
Unexecuted instantiation: hostname-verify.c:get_num_version
Unexecuted instantiation: key_decode.c:get_num_version
Unexecuted instantiation: key_encode.c:get_num_version
Unexecuted instantiation: mpi.c:get_num_version
Unexecuted instantiation: ocsp.c:get_num_version
Unexecuted instantiation: output.c:get_num_version
Unexecuted instantiation: pkcs12.c:get_num_version
Unexecuted instantiation: pkcs12_bag.c:get_num_version
Unexecuted instantiation: pkcs12_encr.c:get_num_version
Unexecuted instantiation: pkcs7-crypt.c:get_num_version
Unexecuted instantiation: privkey_openssl.c:get_num_version
Unexecuted instantiation: privkey_pkcs8.c:get_num_version
Unexecuted instantiation: privkey_pkcs8_pbes1.c:get_num_version
Unexecuted instantiation: prov-seed.c:get_num_version
Unexecuted instantiation: sign.c:get_num_version
Unexecuted instantiation: spki.c:get_num_version
Unexecuted instantiation: time.c:get_num_version
Unexecuted instantiation: tls_features.c:get_num_version
Unexecuted instantiation: verify-high.c:get_num_version
Unexecuted instantiation: verify-high2.c:get_num_version
Unexecuted instantiation: verify.c:get_num_version
Unexecuted instantiation: virt-san.c:get_num_version
Unexecuted instantiation: x509.c:get_num_version
Unexecuted instantiation: x509_dn.c:get_num_version
Unexecuted instantiation: x509_ext.c:get_num_version
Unexecuted instantiation: x509_write.c:get_num_version
Unexecuted instantiation: alpn.c:get_num_version
Unexecuted instantiation: client_cert_type.c:get_num_version
Unexecuted instantiation: compress_certificate.c:get_num_version
Unexecuted instantiation: cookie.c:get_num_version
Unexecuted instantiation: dumbfw.c:get_num_version
Unexecuted instantiation: ec_point_formats.c:get_num_version
Unexecuted instantiation: etm.c:get_num_version
Unexecuted instantiation: ext_master_secret.c:get_num_version
Unexecuted instantiation: heartbeat.c:get_num_version
Unexecuted instantiation: key_share.c:get_num_version
Unexecuted instantiation: max_record.c:get_num_version
Unexecuted instantiation: pre_shared_key.c:get_num_version
Unexecuted instantiation: psk_ke_modes.c:get_num_version
Unexecuted instantiation: record_size_limit.c:get_num_version
Unexecuted instantiation: safe_renegotiation.c:get_num_version
Unexecuted instantiation: server_cert_type.c:get_num_version
Unexecuted instantiation: server_name.c:get_num_version
Unexecuted instantiation: signature.c:get_num_version
Unexecuted instantiation: srtp.c:get_num_version
Unexecuted instantiation: status_request.c:get_num_version
Unexecuted instantiation: supported_groups.c:get_num_version
Unexecuted instantiation: supported_versions.c:get_num_version
Unexecuted instantiation: cert.c:get_num_version
Unexecuted instantiation: dh_common.c:get_num_version
Unexecuted instantiation: psk.c:get_num_version
Unexecuted instantiation: psk_passwd.c:get_num_version
Unexecuted instantiation: cert_types.c:get_num_version
Unexecuted instantiation: ciphers.c:get_num_version
Unexecuted instantiation: ciphersuites.c:get_num_version
Unexecuted instantiation: ecc.c:get_num_version
Unexecuted instantiation: groups.c:get_num_version
Unexecuted instantiation: mac.c:get_num_version
Unexecuted instantiation: protocols.c:get_num_version
Unexecuted instantiation: publickey.c:get_num_version
Unexecuted instantiation: secparams.c:get_num_version
Unexecuted instantiation: accelerated.c:get_num_version
Unexecuted instantiation: cryptodev.c:get_num_version
Unexecuted instantiation: x86-common.c:get_num_version
Unexecuted instantiation: gost28147.c:get_num_version
Unexecuted instantiation: init.c:get_num_version
Unexecuted instantiation: pk.c:get_num_version
Unexecuted instantiation: rnd.c:get_num_version
Unexecuted instantiation: rsa-keygen-fips186.c:get_num_version
Unexecuted instantiation: sysrng-linux.c:get_num_version
Unexecuted instantiation: tls1-prf.c:get_num_version
Unexecuted instantiation: compress.c:get_num_version
Unexecuted instantiation: dh.c:get_num_version
Unexecuted instantiation: x509_b64.c:get_num_version
Unexecuted instantiation: fingerprint.c:get_num_version
Unexecuted instantiation: tls-sig.c:get_num_version
Unexecuted instantiation: certs.c:get_num_version
Unexecuted instantiation: str-iconv.c:get_num_version
Unexecuted instantiation: str-unicode.c:get_num_version
Unexecuted instantiation: file.c:get_num_version
Unexecuted instantiation: pin.c:get_num_version
Unexecuted instantiation: dh-primes.c:get_num_version
Unexecuted instantiation: hello_ext_lib.c:get_num_version
Unexecuted instantiation: stek.c:get_num_version
Unexecuted instantiation: pathbuf.c:get_num_version
Unexecuted instantiation: psk_ext_parser.c:get_num_version
Unexecuted instantiation: anti_replay.c:get_num_version
Unexecuted instantiation: attributes.c:get_num_version
Unexecuted instantiation: email-verify.c:get_num_version
Unexecuted instantiation: ip.c:get_num_version
Unexecuted instantiation: krb5.c:get_num_version
Unexecuted instantiation: name_constraints.c:get_num_version
Unexecuted instantiation: anon.c:get_num_version
Unexecuted instantiation: anon_ecdh.c:get_num_version
Unexecuted instantiation: dhe.c:get_num_version
Unexecuted instantiation: dhe_psk.c:get_num_version
Unexecuted instantiation: ecdhe.c:get_num_version
Unexecuted instantiation: rsa.c:get_num_version
Unexecuted instantiation: rsa_psk.c:get_num_version
Unexecuted instantiation: vko_gost.c:get_num_version
Unexecuted instantiation: aes-cbc-x86-aesni.c:get_num_version
Unexecuted instantiation: aes-cbc-x86-ssse3.c:get_num_version
Unexecuted instantiation: aes-ccm-x86-aesni.c:get_num_version
Unexecuted instantiation: aes-gcm-padlock.c:get_num_version
Unexecuted instantiation: aes-gcm-x86-aesni.c:get_num_version
Unexecuted instantiation: aes-gcm-x86-pclmul-avx.c:get_num_version
Unexecuted instantiation: aes-gcm-x86-pclmul.c:get_num_version
Unexecuted instantiation: aes-gcm-x86-ssse3.c:get_num_version
Unexecuted instantiation: aes-padlock.c:get_num_version
Unexecuted instantiation: aes-xts-x86-aesni.c:get_num_version
Unexecuted instantiation: hmac-padlock.c:get_num_version
Unexecuted instantiation: hmac-x86-ssse3.c:get_num_version
Unexecuted instantiation: sha-padlock.c:get_num_version
Unexecuted instantiation: sha-x86-ssse3.c:get_num_version
Unexecuted instantiation: bignum-le.c:get_num_version
Unexecuted instantiation: dsa-compute-k.c:get_num_version
Unexecuted instantiation: dsa-keygen-fips186.c:get_num_version
Unexecuted instantiation: dsa-validate.c:get_num_version
Unexecuted instantiation: ecdsa-compute-k.c:get_num_version
Unexecuted instantiation: gostdsa-mask.c:get_num_version
Unexecuted instantiation: provable-prime.c:get_num_version
Unexecuted instantiation: vko.c:get_num_version
Unexecuted instantiation: gost_keywrap.c:get_num_version
Unexecuted instantiation: gost-wrap.c:get_num_version
1710
1711
void _gnutls_priority_update_fips(void);
1712
void _gnutls_priority_update_non_aesni(void);
1713
extern unsigned _gnutls_disable_tls13;
1714
1715
0
#define timespec_sub_ms _gnutls_timespec_sub_ms
1716
unsigned int
1717
/* returns a-b in ms */
1718
timespec_sub_ms(struct timespec *a, struct timespec *b);
1719
1720
inline static int _gnutls_timespec_cmp(struct timespec *a, struct timespec *b)
1721
0
{
1722
0
  if (a->tv_sec < b->tv_sec)
1723
0
    return -1;
1724
0
  if (a->tv_sec > b->tv_sec)
1725
0
    return 1;
1726
0
  if (a->tv_nsec < b->tv_nsec)
1727
0
    return -1;
1728
0
  if (a->tv_nsec > b->tv_nsec)
1729
0
    return 1;
1730
0
  return 0;
1731
0
}
Unexecuted instantiation: record.c:_gnutls_timespec_cmp
Unexecuted instantiation: debug.c:_gnutls_timespec_cmp
Unexecuted instantiation: cipher.c:_gnutls_timespec_cmp
Unexecuted instantiation: handshake-tls13.c:_gnutls_timespec_cmp
Unexecuted instantiation: mbuffers.c:_gnutls_timespec_cmp
Unexecuted instantiation: buffers.c:_gnutls_timespec_cmp
Unexecuted instantiation: handshake.c:_gnutls_timespec_cmp
Unexecuted instantiation: errors.c:_gnutls_timespec_cmp
Unexecuted instantiation: kx.c:_gnutls_timespec_cmp
Unexecuted instantiation: cipher-cbc.c:_gnutls_timespec_cmp
Unexecuted instantiation: priority.c:_gnutls_timespec_cmp
Unexecuted instantiation: hash_int.c:_gnutls_timespec_cmp
Unexecuted instantiation: cipher_int.c:_gnutls_timespec_cmp
Unexecuted instantiation: session.c:_gnutls_timespec_cmp
Unexecuted instantiation: db.c:_gnutls_timespec_cmp
Unexecuted instantiation: hello_ext.c:_gnutls_timespec_cmp
Unexecuted instantiation: auth.c:_gnutls_timespec_cmp
Unexecuted instantiation: sslv2_compat.c:_gnutls_timespec_cmp
Unexecuted instantiation: datum.c:_gnutls_timespec_cmp
Unexecuted instantiation: session_pack.c:_gnutls_timespec_cmp
Unexecuted instantiation: cert-cred.c:_gnutls_timespec_cmp
Unexecuted instantiation: global.c:_gnutls_timespec_cmp
Unexecuted instantiation: constate.c:_gnutls_timespec_cmp
Unexecuted instantiation: mem.c:_gnutls_timespec_cmp
Unexecuted instantiation: alert.c:_gnutls_timespec_cmp
Unexecuted instantiation: threads.c:_gnutls_timespec_cmp
Unexecuted instantiation: sockets.c:_gnutls_timespec_cmp
Unexecuted instantiation: system.c:_gnutls_timespec_cmp
Unexecuted instantiation: profiles.c:_gnutls_timespec_cmp
Unexecuted instantiation: str.c:_gnutls_timespec_cmp
Unexecuted instantiation: str-idna.c:_gnutls_timespec_cmp
Unexecuted instantiation: state.c:_gnutls_timespec_cmp
Unexecuted instantiation: cert-cred-x509.c:_gnutls_timespec_cmp
Unexecuted instantiation: supplemental.c:_gnutls_timespec_cmp
Unexecuted instantiation: random.c:_gnutls_timespec_cmp
Unexecuted instantiation: crypto-api.c:_gnutls_timespec_cmp
Unexecuted instantiation: privkey.c:_gnutls_timespec_cmp
Unexecuted instantiation: pcert.c:_gnutls_timespec_cmp
Unexecuted instantiation: pubkey.c:_gnutls_timespec_cmp
Unexecuted instantiation: dtls.c:_gnutls_timespec_cmp
Unexecuted instantiation: system_override.c:_gnutls_timespec_cmp
Unexecuted instantiation: crypto-backend.c:_gnutls_timespec_cmp
Unexecuted instantiation: fips.c:_gnutls_timespec_cmp
Unexecuted instantiation: safe-memfuncs.c:_gnutls_timespec_cmp
Unexecuted instantiation: atfork.c:_gnutls_timespec_cmp
Unexecuted instantiation: urls.c:_gnutls_timespec_cmp
Unexecuted instantiation: prf.c:_gnutls_timespec_cmp
Unexecuted instantiation: dh-session.c:_gnutls_timespec_cmp
Unexecuted instantiation: cert-session.c:_gnutls_timespec_cmp
Unexecuted instantiation: handshake-checks.c:_gnutls_timespec_cmp
Unexecuted instantiation: dtls-sw.c:_gnutls_timespec_cmp
Unexecuted instantiation: secrets.c:_gnutls_timespec_cmp
Unexecuted instantiation: extv.c:_gnutls_timespec_cmp
Unexecuted instantiation: ocsp-api.c:_gnutls_timespec_cmp
Unexecuted instantiation: iov.c:_gnutls_timespec_cmp
Unexecuted instantiation: ktls.c:_gnutls_timespec_cmp
Unexecuted instantiation: keys-dummy.c:_gnutls_timespec_cmp
Unexecuted instantiation: encrypted_extensions.c:_gnutls_timespec_cmp
Unexecuted instantiation: certificate_request.c:_gnutls_timespec_cmp
Unexecuted instantiation: certificate_verify.c:_gnutls_timespec_cmp
Unexecuted instantiation: tls13-sig.c:_gnutls_timespec_cmp
Unexecuted instantiation: finished.c:_gnutls_timespec_cmp
Unexecuted instantiation: key_update.c:_gnutls_timespec_cmp
Unexecuted instantiation: hello_retry.c:_gnutls_timespec_cmp
Unexecuted instantiation: session_ticket.c:_gnutls_timespec_cmp
Unexecuted instantiation: certificate.c:_gnutls_timespec_cmp
Unexecuted instantiation: early_data.c:_gnutls_timespec_cmp
Unexecuted instantiation: post_handshake.c:_gnutls_timespec_cmp
Unexecuted instantiation: common.c:_gnutls_timespec_cmp
Unexecuted instantiation: crl.c:_gnutls_timespec_cmp
Unexecuted instantiation: crq.c:_gnutls_timespec_cmp
Unexecuted instantiation: dn.c:_gnutls_timespec_cmp
Unexecuted instantiation: extensions.c:_gnutls_timespec_cmp
Unexecuted instantiation: hostname-verify.c:_gnutls_timespec_cmp
Unexecuted instantiation: key_decode.c:_gnutls_timespec_cmp
Unexecuted instantiation: key_encode.c:_gnutls_timespec_cmp
Unexecuted instantiation: mpi.c:_gnutls_timespec_cmp
Unexecuted instantiation: ocsp.c:_gnutls_timespec_cmp
Unexecuted instantiation: output.c:_gnutls_timespec_cmp
Unexecuted instantiation: pkcs12.c:_gnutls_timespec_cmp
Unexecuted instantiation: pkcs12_bag.c:_gnutls_timespec_cmp
Unexecuted instantiation: pkcs12_encr.c:_gnutls_timespec_cmp
Unexecuted instantiation: pkcs7-crypt.c:_gnutls_timespec_cmp
Unexecuted instantiation: privkey_openssl.c:_gnutls_timespec_cmp
Unexecuted instantiation: privkey_pkcs8.c:_gnutls_timespec_cmp
Unexecuted instantiation: privkey_pkcs8_pbes1.c:_gnutls_timespec_cmp
Unexecuted instantiation: prov-seed.c:_gnutls_timespec_cmp
Unexecuted instantiation: sign.c:_gnutls_timespec_cmp
Unexecuted instantiation: spki.c:_gnutls_timespec_cmp
Unexecuted instantiation: time.c:_gnutls_timespec_cmp
Unexecuted instantiation: tls_features.c:_gnutls_timespec_cmp
Unexecuted instantiation: verify-high.c:_gnutls_timespec_cmp
Unexecuted instantiation: verify-high2.c:_gnutls_timespec_cmp
Unexecuted instantiation: verify.c:_gnutls_timespec_cmp
Unexecuted instantiation: virt-san.c:_gnutls_timespec_cmp
Unexecuted instantiation: x509.c:_gnutls_timespec_cmp
Unexecuted instantiation: x509_dn.c:_gnutls_timespec_cmp
Unexecuted instantiation: x509_ext.c:_gnutls_timespec_cmp
Unexecuted instantiation: x509_write.c:_gnutls_timespec_cmp
Unexecuted instantiation: alpn.c:_gnutls_timespec_cmp
Unexecuted instantiation: client_cert_type.c:_gnutls_timespec_cmp
Unexecuted instantiation: compress_certificate.c:_gnutls_timespec_cmp
Unexecuted instantiation: cookie.c:_gnutls_timespec_cmp
Unexecuted instantiation: dumbfw.c:_gnutls_timespec_cmp
Unexecuted instantiation: ec_point_formats.c:_gnutls_timespec_cmp
Unexecuted instantiation: etm.c:_gnutls_timespec_cmp
Unexecuted instantiation: ext_master_secret.c:_gnutls_timespec_cmp
Unexecuted instantiation: heartbeat.c:_gnutls_timespec_cmp
Unexecuted instantiation: key_share.c:_gnutls_timespec_cmp
Unexecuted instantiation: max_record.c:_gnutls_timespec_cmp
Unexecuted instantiation: pre_shared_key.c:_gnutls_timespec_cmp
Unexecuted instantiation: psk_ke_modes.c:_gnutls_timespec_cmp
Unexecuted instantiation: record_size_limit.c:_gnutls_timespec_cmp
Unexecuted instantiation: safe_renegotiation.c:_gnutls_timespec_cmp
Unexecuted instantiation: server_cert_type.c:_gnutls_timespec_cmp
Unexecuted instantiation: server_name.c:_gnutls_timespec_cmp
Unexecuted instantiation: signature.c:_gnutls_timespec_cmp
Unexecuted instantiation: srtp.c:_gnutls_timespec_cmp
Unexecuted instantiation: status_request.c:_gnutls_timespec_cmp
Unexecuted instantiation: supported_groups.c:_gnutls_timespec_cmp
Unexecuted instantiation: supported_versions.c:_gnutls_timespec_cmp
Unexecuted instantiation: cert.c:_gnutls_timespec_cmp
Unexecuted instantiation: dh_common.c:_gnutls_timespec_cmp
Unexecuted instantiation: psk.c:_gnutls_timespec_cmp
Unexecuted instantiation: psk_passwd.c:_gnutls_timespec_cmp
Unexecuted instantiation: cert_types.c:_gnutls_timespec_cmp
Unexecuted instantiation: ciphers.c:_gnutls_timespec_cmp
Unexecuted instantiation: ciphersuites.c:_gnutls_timespec_cmp
Unexecuted instantiation: ecc.c:_gnutls_timespec_cmp
Unexecuted instantiation: groups.c:_gnutls_timespec_cmp
Unexecuted instantiation: mac.c:_gnutls_timespec_cmp
Unexecuted instantiation: protocols.c:_gnutls_timespec_cmp
Unexecuted instantiation: publickey.c:_gnutls_timespec_cmp
Unexecuted instantiation: secparams.c:_gnutls_timespec_cmp
Unexecuted instantiation: accelerated.c:_gnutls_timespec_cmp
Unexecuted instantiation: cryptodev.c:_gnutls_timespec_cmp
Unexecuted instantiation: x86-common.c:_gnutls_timespec_cmp
Unexecuted instantiation: gost28147.c:_gnutls_timespec_cmp
Unexecuted instantiation: init.c:_gnutls_timespec_cmp
Unexecuted instantiation: pk.c:_gnutls_timespec_cmp
Unexecuted instantiation: rnd.c:_gnutls_timespec_cmp
Unexecuted instantiation: rsa-keygen-fips186.c:_gnutls_timespec_cmp
Unexecuted instantiation: sysrng-linux.c:_gnutls_timespec_cmp
Unexecuted instantiation: tls1-prf.c:_gnutls_timespec_cmp
Unexecuted instantiation: compress.c:_gnutls_timespec_cmp
Unexecuted instantiation: dh.c:_gnutls_timespec_cmp
Unexecuted instantiation: x509_b64.c:_gnutls_timespec_cmp
Unexecuted instantiation: fingerprint.c:_gnutls_timespec_cmp
Unexecuted instantiation: tls-sig.c:_gnutls_timespec_cmp
Unexecuted instantiation: certs.c:_gnutls_timespec_cmp
Unexecuted instantiation: str-iconv.c:_gnutls_timespec_cmp
Unexecuted instantiation: str-unicode.c:_gnutls_timespec_cmp
Unexecuted instantiation: file.c:_gnutls_timespec_cmp
Unexecuted instantiation: pin.c:_gnutls_timespec_cmp
Unexecuted instantiation: dh-primes.c:_gnutls_timespec_cmp
Unexecuted instantiation: hello_ext_lib.c:_gnutls_timespec_cmp
Unexecuted instantiation: stek.c:_gnutls_timespec_cmp
Unexecuted instantiation: pathbuf.c:_gnutls_timespec_cmp
Unexecuted instantiation: psk_ext_parser.c:_gnutls_timespec_cmp
Unexecuted instantiation: anti_replay.c:_gnutls_timespec_cmp
Unexecuted instantiation: attributes.c:_gnutls_timespec_cmp
Unexecuted instantiation: email-verify.c:_gnutls_timespec_cmp
Unexecuted instantiation: ip.c:_gnutls_timespec_cmp
Unexecuted instantiation: krb5.c:_gnutls_timespec_cmp
Unexecuted instantiation: name_constraints.c:_gnutls_timespec_cmp
Unexecuted instantiation: anon.c:_gnutls_timespec_cmp
Unexecuted instantiation: anon_ecdh.c:_gnutls_timespec_cmp
Unexecuted instantiation: dhe.c:_gnutls_timespec_cmp
Unexecuted instantiation: dhe_psk.c:_gnutls_timespec_cmp
Unexecuted instantiation: ecdhe.c:_gnutls_timespec_cmp
Unexecuted instantiation: rsa.c:_gnutls_timespec_cmp
Unexecuted instantiation: rsa_psk.c:_gnutls_timespec_cmp
Unexecuted instantiation: vko_gost.c:_gnutls_timespec_cmp
Unexecuted instantiation: aes-cbc-x86-aesni.c:_gnutls_timespec_cmp
Unexecuted instantiation: aes-cbc-x86-ssse3.c:_gnutls_timespec_cmp
Unexecuted instantiation: aes-ccm-x86-aesni.c:_gnutls_timespec_cmp
Unexecuted instantiation: aes-gcm-padlock.c:_gnutls_timespec_cmp
Unexecuted instantiation: aes-gcm-x86-aesni.c:_gnutls_timespec_cmp
Unexecuted instantiation: aes-gcm-x86-pclmul-avx.c:_gnutls_timespec_cmp
Unexecuted instantiation: aes-gcm-x86-pclmul.c:_gnutls_timespec_cmp
Unexecuted instantiation: aes-gcm-x86-ssse3.c:_gnutls_timespec_cmp
Unexecuted instantiation: aes-padlock.c:_gnutls_timespec_cmp
Unexecuted instantiation: aes-xts-x86-aesni.c:_gnutls_timespec_cmp
Unexecuted instantiation: hmac-padlock.c:_gnutls_timespec_cmp
Unexecuted instantiation: hmac-x86-ssse3.c:_gnutls_timespec_cmp
Unexecuted instantiation: sha-padlock.c:_gnutls_timespec_cmp
Unexecuted instantiation: sha-x86-ssse3.c:_gnutls_timespec_cmp
Unexecuted instantiation: bignum-le.c:_gnutls_timespec_cmp
Unexecuted instantiation: dsa-compute-k.c:_gnutls_timespec_cmp
Unexecuted instantiation: dsa-keygen-fips186.c:_gnutls_timespec_cmp
Unexecuted instantiation: dsa-validate.c:_gnutls_timespec_cmp
Unexecuted instantiation: ecdsa-compute-k.c:_gnutls_timespec_cmp
Unexecuted instantiation: gostdsa-mask.c:_gnutls_timespec_cmp
Unexecuted instantiation: provable-prime.c:_gnutls_timespec_cmp
Unexecuted instantiation: vko.c:_gnutls_timespec_cmp
Unexecuted instantiation: gost_keywrap.c:_gnutls_timespec_cmp
Unexecuted instantiation: gost-wrap.c:_gnutls_timespec_cmp
1732
1733
#include "algorithms.h"
1734
inline static int _gnutls_set_current_version(gnutls_session_t s, unsigned v)
1735
0
{
1736
0
  s->security_parameters.pversion = version_to_entry(v);
1737
0
  if (s->security_parameters.pversion == NULL) {
1738
0
    return GNUTLS_E_UNSUPPORTED_VERSION_PACKET;
1739
0
  }
1740
0
  return 0;
1741
0
}
Unexecuted instantiation: record.c:_gnutls_set_current_version
Unexecuted instantiation: debug.c:_gnutls_set_current_version
Unexecuted instantiation: cipher.c:_gnutls_set_current_version
Unexecuted instantiation: handshake-tls13.c:_gnutls_set_current_version
Unexecuted instantiation: mbuffers.c:_gnutls_set_current_version
Unexecuted instantiation: buffers.c:_gnutls_set_current_version
Unexecuted instantiation: handshake.c:_gnutls_set_current_version
Unexecuted instantiation: errors.c:_gnutls_set_current_version
Unexecuted instantiation: kx.c:_gnutls_set_current_version
Unexecuted instantiation: cipher-cbc.c:_gnutls_set_current_version
Unexecuted instantiation: priority.c:_gnutls_set_current_version
Unexecuted instantiation: hash_int.c:_gnutls_set_current_version
Unexecuted instantiation: cipher_int.c:_gnutls_set_current_version
Unexecuted instantiation: session.c:_gnutls_set_current_version
Unexecuted instantiation: db.c:_gnutls_set_current_version
Unexecuted instantiation: hello_ext.c:_gnutls_set_current_version
Unexecuted instantiation: auth.c:_gnutls_set_current_version
Unexecuted instantiation: sslv2_compat.c:_gnutls_set_current_version
Unexecuted instantiation: datum.c:_gnutls_set_current_version
Unexecuted instantiation: session_pack.c:_gnutls_set_current_version
Unexecuted instantiation: cert-cred.c:_gnutls_set_current_version
Unexecuted instantiation: global.c:_gnutls_set_current_version
Unexecuted instantiation: constate.c:_gnutls_set_current_version
Unexecuted instantiation: mem.c:_gnutls_set_current_version
Unexecuted instantiation: alert.c:_gnutls_set_current_version
Unexecuted instantiation: threads.c:_gnutls_set_current_version
Unexecuted instantiation: sockets.c:_gnutls_set_current_version
Unexecuted instantiation: system.c:_gnutls_set_current_version
Unexecuted instantiation: profiles.c:_gnutls_set_current_version
Unexecuted instantiation: str.c:_gnutls_set_current_version
Unexecuted instantiation: str-idna.c:_gnutls_set_current_version
Unexecuted instantiation: state.c:_gnutls_set_current_version
Unexecuted instantiation: cert-cred-x509.c:_gnutls_set_current_version
Unexecuted instantiation: supplemental.c:_gnutls_set_current_version
Unexecuted instantiation: random.c:_gnutls_set_current_version
Unexecuted instantiation: crypto-api.c:_gnutls_set_current_version
Unexecuted instantiation: privkey.c:_gnutls_set_current_version
Unexecuted instantiation: pcert.c:_gnutls_set_current_version
Unexecuted instantiation: pubkey.c:_gnutls_set_current_version
Unexecuted instantiation: dtls.c:_gnutls_set_current_version
Unexecuted instantiation: system_override.c:_gnutls_set_current_version
Unexecuted instantiation: crypto-backend.c:_gnutls_set_current_version
Unexecuted instantiation: fips.c:_gnutls_set_current_version
Unexecuted instantiation: safe-memfuncs.c:_gnutls_set_current_version
Unexecuted instantiation: atfork.c:_gnutls_set_current_version
Unexecuted instantiation: urls.c:_gnutls_set_current_version
Unexecuted instantiation: prf.c:_gnutls_set_current_version
Unexecuted instantiation: dh-session.c:_gnutls_set_current_version
Unexecuted instantiation: cert-session.c:_gnutls_set_current_version
Unexecuted instantiation: handshake-checks.c:_gnutls_set_current_version
Unexecuted instantiation: dtls-sw.c:_gnutls_set_current_version
Unexecuted instantiation: secrets.c:_gnutls_set_current_version
Unexecuted instantiation: extv.c:_gnutls_set_current_version
Unexecuted instantiation: ocsp-api.c:_gnutls_set_current_version
Unexecuted instantiation: iov.c:_gnutls_set_current_version
Unexecuted instantiation: ktls.c:_gnutls_set_current_version
Unexecuted instantiation: keys-dummy.c:_gnutls_set_current_version
Unexecuted instantiation: encrypted_extensions.c:_gnutls_set_current_version
Unexecuted instantiation: certificate_request.c:_gnutls_set_current_version
Unexecuted instantiation: certificate_verify.c:_gnutls_set_current_version
Unexecuted instantiation: tls13-sig.c:_gnutls_set_current_version
Unexecuted instantiation: finished.c:_gnutls_set_current_version
Unexecuted instantiation: key_update.c:_gnutls_set_current_version
Unexecuted instantiation: hello_retry.c:_gnutls_set_current_version
Unexecuted instantiation: session_ticket.c:_gnutls_set_current_version
Unexecuted instantiation: certificate.c:_gnutls_set_current_version
Unexecuted instantiation: early_data.c:_gnutls_set_current_version
Unexecuted instantiation: post_handshake.c:_gnutls_set_current_version
Unexecuted instantiation: common.c:_gnutls_set_current_version
Unexecuted instantiation: crl.c:_gnutls_set_current_version
Unexecuted instantiation: crq.c:_gnutls_set_current_version
Unexecuted instantiation: dn.c:_gnutls_set_current_version
Unexecuted instantiation: extensions.c:_gnutls_set_current_version
Unexecuted instantiation: hostname-verify.c:_gnutls_set_current_version
Unexecuted instantiation: key_decode.c:_gnutls_set_current_version
Unexecuted instantiation: key_encode.c:_gnutls_set_current_version
Unexecuted instantiation: mpi.c:_gnutls_set_current_version
Unexecuted instantiation: ocsp.c:_gnutls_set_current_version
Unexecuted instantiation: output.c:_gnutls_set_current_version
Unexecuted instantiation: pkcs12.c:_gnutls_set_current_version
Unexecuted instantiation: pkcs12_bag.c:_gnutls_set_current_version
Unexecuted instantiation: pkcs12_encr.c:_gnutls_set_current_version
Unexecuted instantiation: pkcs7-crypt.c:_gnutls_set_current_version
Unexecuted instantiation: privkey_openssl.c:_gnutls_set_current_version
Unexecuted instantiation: privkey_pkcs8.c:_gnutls_set_current_version
Unexecuted instantiation: privkey_pkcs8_pbes1.c:_gnutls_set_current_version
Unexecuted instantiation: prov-seed.c:_gnutls_set_current_version
Unexecuted instantiation: sign.c:_gnutls_set_current_version
Unexecuted instantiation: spki.c:_gnutls_set_current_version
Unexecuted instantiation: time.c:_gnutls_set_current_version
Unexecuted instantiation: tls_features.c:_gnutls_set_current_version
Unexecuted instantiation: verify-high.c:_gnutls_set_current_version
Unexecuted instantiation: verify-high2.c:_gnutls_set_current_version
Unexecuted instantiation: verify.c:_gnutls_set_current_version
Unexecuted instantiation: virt-san.c:_gnutls_set_current_version
Unexecuted instantiation: x509.c:_gnutls_set_current_version
Unexecuted instantiation: x509_dn.c:_gnutls_set_current_version
Unexecuted instantiation: x509_ext.c:_gnutls_set_current_version
Unexecuted instantiation: x509_write.c:_gnutls_set_current_version
Unexecuted instantiation: alpn.c:_gnutls_set_current_version
Unexecuted instantiation: client_cert_type.c:_gnutls_set_current_version
Unexecuted instantiation: compress_certificate.c:_gnutls_set_current_version
Unexecuted instantiation: cookie.c:_gnutls_set_current_version
Unexecuted instantiation: dumbfw.c:_gnutls_set_current_version
Unexecuted instantiation: ec_point_formats.c:_gnutls_set_current_version
Unexecuted instantiation: etm.c:_gnutls_set_current_version
Unexecuted instantiation: ext_master_secret.c:_gnutls_set_current_version
Unexecuted instantiation: heartbeat.c:_gnutls_set_current_version
Unexecuted instantiation: key_share.c:_gnutls_set_current_version
Unexecuted instantiation: max_record.c:_gnutls_set_current_version
Unexecuted instantiation: pre_shared_key.c:_gnutls_set_current_version
Unexecuted instantiation: psk_ke_modes.c:_gnutls_set_current_version
Unexecuted instantiation: record_size_limit.c:_gnutls_set_current_version
Unexecuted instantiation: safe_renegotiation.c:_gnutls_set_current_version
Unexecuted instantiation: server_cert_type.c:_gnutls_set_current_version
Unexecuted instantiation: server_name.c:_gnutls_set_current_version
Unexecuted instantiation: signature.c:_gnutls_set_current_version
Unexecuted instantiation: srtp.c:_gnutls_set_current_version
Unexecuted instantiation: status_request.c:_gnutls_set_current_version
Unexecuted instantiation: supported_groups.c:_gnutls_set_current_version
Unexecuted instantiation: supported_versions.c:_gnutls_set_current_version
Unexecuted instantiation: cert.c:_gnutls_set_current_version
Unexecuted instantiation: dh_common.c:_gnutls_set_current_version
Unexecuted instantiation: psk.c:_gnutls_set_current_version
Unexecuted instantiation: psk_passwd.c:_gnutls_set_current_version
Unexecuted instantiation: cert_types.c:_gnutls_set_current_version
Unexecuted instantiation: ciphers.c:_gnutls_set_current_version
Unexecuted instantiation: ciphersuites.c:_gnutls_set_current_version
Unexecuted instantiation: ecc.c:_gnutls_set_current_version
Unexecuted instantiation: groups.c:_gnutls_set_current_version
Unexecuted instantiation: mac.c:_gnutls_set_current_version
Unexecuted instantiation: protocols.c:_gnutls_set_current_version
Unexecuted instantiation: publickey.c:_gnutls_set_current_version
Unexecuted instantiation: secparams.c:_gnutls_set_current_version
Unexecuted instantiation: accelerated.c:_gnutls_set_current_version
Unexecuted instantiation: cryptodev.c:_gnutls_set_current_version
Unexecuted instantiation: x86-common.c:_gnutls_set_current_version
Unexecuted instantiation: gost28147.c:_gnutls_set_current_version
Unexecuted instantiation: init.c:_gnutls_set_current_version
Unexecuted instantiation: pk.c:_gnutls_set_current_version
Unexecuted instantiation: rnd.c:_gnutls_set_current_version
Unexecuted instantiation: rsa-keygen-fips186.c:_gnutls_set_current_version
Unexecuted instantiation: sysrng-linux.c:_gnutls_set_current_version
Unexecuted instantiation: tls1-prf.c:_gnutls_set_current_version
Unexecuted instantiation: compress.c:_gnutls_set_current_version
Unexecuted instantiation: dh.c:_gnutls_set_current_version
Unexecuted instantiation: x509_b64.c:_gnutls_set_current_version
Unexecuted instantiation: fingerprint.c:_gnutls_set_current_version
Unexecuted instantiation: tls-sig.c:_gnutls_set_current_version
Unexecuted instantiation: certs.c:_gnutls_set_current_version
Unexecuted instantiation: str-iconv.c:_gnutls_set_current_version
Unexecuted instantiation: str-unicode.c:_gnutls_set_current_version
Unexecuted instantiation: file.c:_gnutls_set_current_version
Unexecuted instantiation: pin.c:_gnutls_set_current_version
Unexecuted instantiation: dh-primes.c:_gnutls_set_current_version
Unexecuted instantiation: hello_ext_lib.c:_gnutls_set_current_version
Unexecuted instantiation: stek.c:_gnutls_set_current_version
Unexecuted instantiation: pathbuf.c:_gnutls_set_current_version
Unexecuted instantiation: psk_ext_parser.c:_gnutls_set_current_version
Unexecuted instantiation: anti_replay.c:_gnutls_set_current_version
Unexecuted instantiation: attributes.c:_gnutls_set_current_version
Unexecuted instantiation: email-verify.c:_gnutls_set_current_version
Unexecuted instantiation: ip.c:_gnutls_set_current_version
Unexecuted instantiation: krb5.c:_gnutls_set_current_version
Unexecuted instantiation: name_constraints.c:_gnutls_set_current_version
Unexecuted instantiation: anon.c:_gnutls_set_current_version
Unexecuted instantiation: anon_ecdh.c:_gnutls_set_current_version
Unexecuted instantiation: dhe.c:_gnutls_set_current_version
Unexecuted instantiation: dhe_psk.c:_gnutls_set_current_version
Unexecuted instantiation: ecdhe.c:_gnutls_set_current_version
Unexecuted instantiation: rsa.c:_gnutls_set_current_version
Unexecuted instantiation: rsa_psk.c:_gnutls_set_current_version
Unexecuted instantiation: vko_gost.c:_gnutls_set_current_version
Unexecuted instantiation: aes-cbc-x86-aesni.c:_gnutls_set_current_version
Unexecuted instantiation: aes-cbc-x86-ssse3.c:_gnutls_set_current_version
Unexecuted instantiation: aes-ccm-x86-aesni.c:_gnutls_set_current_version
Unexecuted instantiation: aes-gcm-padlock.c:_gnutls_set_current_version
Unexecuted instantiation: aes-gcm-x86-aesni.c:_gnutls_set_current_version
Unexecuted instantiation: aes-gcm-x86-pclmul-avx.c:_gnutls_set_current_version
Unexecuted instantiation: aes-gcm-x86-pclmul.c:_gnutls_set_current_version
Unexecuted instantiation: aes-gcm-x86-ssse3.c:_gnutls_set_current_version
Unexecuted instantiation: aes-padlock.c:_gnutls_set_current_version
Unexecuted instantiation: aes-xts-x86-aesni.c:_gnutls_set_current_version
Unexecuted instantiation: hmac-padlock.c:_gnutls_set_current_version
Unexecuted instantiation: hmac-x86-ssse3.c:_gnutls_set_current_version
Unexecuted instantiation: sha-padlock.c:_gnutls_set_current_version
Unexecuted instantiation: sha-x86-ssse3.c:_gnutls_set_current_version
Unexecuted instantiation: bignum-le.c:_gnutls_set_current_version
Unexecuted instantiation: dsa-compute-k.c:_gnutls_set_current_version
Unexecuted instantiation: dsa-keygen-fips186.c:_gnutls_set_current_version
Unexecuted instantiation: dsa-validate.c:_gnutls_set_current_version
Unexecuted instantiation: ecdsa-compute-k.c:_gnutls_set_current_version
Unexecuted instantiation: gostdsa-mask.c:_gnutls_set_current_version
Unexecuted instantiation: provable-prime.c:_gnutls_set_current_version
Unexecuted instantiation: vko.c:_gnutls_set_current_version
Unexecuted instantiation: gost_keywrap.c:_gnutls_set_current_version
Unexecuted instantiation: gost-wrap.c:_gnutls_set_current_version
1742
1743
/* Returns the maximum amount of the plaintext to be sent, considering
1744
 * both user-specified/negotiated maximum values.
1745
 */
1746
inline static size_t max_record_send_size(gnutls_session_t session)
1747
0
{
1748
0
  size_t max;
1749
1750
0
  max = MIN(session->security_parameters.max_record_send_size,
1751
0
      session->security_parameters.max_user_record_send_size);
1752
1753
0
  if (IS_DTLS(session))
1754
0
    max = MIN(gnutls_dtls_get_data_mtu(session), max);
1755
1756
0
  return max;
1757
0
}
Unexecuted instantiation: record.c:max_record_send_size
Unexecuted instantiation: debug.c:max_record_send_size
Unexecuted instantiation: cipher.c:max_record_send_size
Unexecuted instantiation: handshake-tls13.c:max_record_send_size
Unexecuted instantiation: mbuffers.c:max_record_send_size
Unexecuted instantiation: buffers.c:max_record_send_size
Unexecuted instantiation: handshake.c:max_record_send_size
Unexecuted instantiation: errors.c:max_record_send_size
Unexecuted instantiation: kx.c:max_record_send_size
Unexecuted instantiation: cipher-cbc.c:max_record_send_size
Unexecuted instantiation: priority.c:max_record_send_size
Unexecuted instantiation: hash_int.c:max_record_send_size
Unexecuted instantiation: cipher_int.c:max_record_send_size
Unexecuted instantiation: session.c:max_record_send_size
Unexecuted instantiation: db.c:max_record_send_size
Unexecuted instantiation: hello_ext.c:max_record_send_size
Unexecuted instantiation: auth.c:max_record_send_size
Unexecuted instantiation: sslv2_compat.c:max_record_send_size
Unexecuted instantiation: datum.c:max_record_send_size
Unexecuted instantiation: session_pack.c:max_record_send_size
Unexecuted instantiation: cert-cred.c:max_record_send_size
Unexecuted instantiation: global.c:max_record_send_size
Unexecuted instantiation: constate.c:max_record_send_size
Unexecuted instantiation: mem.c:max_record_send_size
Unexecuted instantiation: alert.c:max_record_send_size
Unexecuted instantiation: threads.c:max_record_send_size
Unexecuted instantiation: sockets.c:max_record_send_size
Unexecuted instantiation: system.c:max_record_send_size
Unexecuted instantiation: profiles.c:max_record_send_size
Unexecuted instantiation: str.c:max_record_send_size
Unexecuted instantiation: str-idna.c:max_record_send_size
Unexecuted instantiation: state.c:max_record_send_size
Unexecuted instantiation: cert-cred-x509.c:max_record_send_size
Unexecuted instantiation: supplemental.c:max_record_send_size
Unexecuted instantiation: random.c:max_record_send_size
Unexecuted instantiation: crypto-api.c:max_record_send_size
Unexecuted instantiation: privkey.c:max_record_send_size
Unexecuted instantiation: pcert.c:max_record_send_size
Unexecuted instantiation: pubkey.c:max_record_send_size
Unexecuted instantiation: dtls.c:max_record_send_size
Unexecuted instantiation: system_override.c:max_record_send_size
Unexecuted instantiation: crypto-backend.c:max_record_send_size
Unexecuted instantiation: fips.c:max_record_send_size
Unexecuted instantiation: safe-memfuncs.c:max_record_send_size
Unexecuted instantiation: atfork.c:max_record_send_size
Unexecuted instantiation: urls.c:max_record_send_size
Unexecuted instantiation: prf.c:max_record_send_size
Unexecuted instantiation: dh-session.c:max_record_send_size
Unexecuted instantiation: cert-session.c:max_record_send_size
Unexecuted instantiation: handshake-checks.c:max_record_send_size
Unexecuted instantiation: dtls-sw.c:max_record_send_size
Unexecuted instantiation: secrets.c:max_record_send_size
Unexecuted instantiation: extv.c:max_record_send_size
Unexecuted instantiation: ocsp-api.c:max_record_send_size
Unexecuted instantiation: iov.c:max_record_send_size
Unexecuted instantiation: ktls.c:max_record_send_size
Unexecuted instantiation: keys-dummy.c:max_record_send_size
Unexecuted instantiation: encrypted_extensions.c:max_record_send_size
Unexecuted instantiation: certificate_request.c:max_record_send_size
Unexecuted instantiation: certificate_verify.c:max_record_send_size
Unexecuted instantiation: tls13-sig.c:max_record_send_size
Unexecuted instantiation: finished.c:max_record_send_size
Unexecuted instantiation: key_update.c:max_record_send_size
Unexecuted instantiation: hello_retry.c:max_record_send_size
Unexecuted instantiation: session_ticket.c:max_record_send_size
Unexecuted instantiation: certificate.c:max_record_send_size
Unexecuted instantiation: early_data.c:max_record_send_size
Unexecuted instantiation: post_handshake.c:max_record_send_size
Unexecuted instantiation: common.c:max_record_send_size
Unexecuted instantiation: crl.c:max_record_send_size
Unexecuted instantiation: crq.c:max_record_send_size
Unexecuted instantiation: dn.c:max_record_send_size
Unexecuted instantiation: extensions.c:max_record_send_size
Unexecuted instantiation: hostname-verify.c:max_record_send_size
Unexecuted instantiation: key_decode.c:max_record_send_size
Unexecuted instantiation: key_encode.c:max_record_send_size
Unexecuted instantiation: mpi.c:max_record_send_size
Unexecuted instantiation: ocsp.c:max_record_send_size
Unexecuted instantiation: output.c:max_record_send_size
Unexecuted instantiation: pkcs12.c:max_record_send_size
Unexecuted instantiation: pkcs12_bag.c:max_record_send_size
Unexecuted instantiation: pkcs12_encr.c:max_record_send_size
Unexecuted instantiation: pkcs7-crypt.c:max_record_send_size
Unexecuted instantiation: privkey_openssl.c:max_record_send_size
Unexecuted instantiation: privkey_pkcs8.c:max_record_send_size
Unexecuted instantiation: privkey_pkcs8_pbes1.c:max_record_send_size
Unexecuted instantiation: prov-seed.c:max_record_send_size
Unexecuted instantiation: sign.c:max_record_send_size
Unexecuted instantiation: spki.c:max_record_send_size
Unexecuted instantiation: time.c:max_record_send_size
Unexecuted instantiation: tls_features.c:max_record_send_size
Unexecuted instantiation: verify-high.c:max_record_send_size
Unexecuted instantiation: verify-high2.c:max_record_send_size
Unexecuted instantiation: verify.c:max_record_send_size
Unexecuted instantiation: virt-san.c:max_record_send_size
Unexecuted instantiation: x509.c:max_record_send_size
Unexecuted instantiation: x509_dn.c:max_record_send_size
Unexecuted instantiation: x509_ext.c:max_record_send_size
Unexecuted instantiation: x509_write.c:max_record_send_size
Unexecuted instantiation: alpn.c:max_record_send_size
Unexecuted instantiation: client_cert_type.c:max_record_send_size
Unexecuted instantiation: compress_certificate.c:max_record_send_size
Unexecuted instantiation: cookie.c:max_record_send_size
Unexecuted instantiation: dumbfw.c:max_record_send_size
Unexecuted instantiation: ec_point_formats.c:max_record_send_size
Unexecuted instantiation: etm.c:max_record_send_size
Unexecuted instantiation: ext_master_secret.c:max_record_send_size
Unexecuted instantiation: heartbeat.c:max_record_send_size
Unexecuted instantiation: key_share.c:max_record_send_size
Unexecuted instantiation: max_record.c:max_record_send_size
Unexecuted instantiation: pre_shared_key.c:max_record_send_size
Unexecuted instantiation: psk_ke_modes.c:max_record_send_size
Unexecuted instantiation: record_size_limit.c:max_record_send_size
Unexecuted instantiation: safe_renegotiation.c:max_record_send_size
Unexecuted instantiation: server_cert_type.c:max_record_send_size
Unexecuted instantiation: server_name.c:max_record_send_size
Unexecuted instantiation: signature.c:max_record_send_size
Unexecuted instantiation: srtp.c:max_record_send_size
Unexecuted instantiation: status_request.c:max_record_send_size
Unexecuted instantiation: supported_groups.c:max_record_send_size
Unexecuted instantiation: supported_versions.c:max_record_send_size
Unexecuted instantiation: cert.c:max_record_send_size
Unexecuted instantiation: dh_common.c:max_record_send_size
Unexecuted instantiation: psk.c:max_record_send_size
Unexecuted instantiation: psk_passwd.c:max_record_send_size
Unexecuted instantiation: cert_types.c:max_record_send_size
Unexecuted instantiation: ciphers.c:max_record_send_size
Unexecuted instantiation: ciphersuites.c:max_record_send_size
Unexecuted instantiation: ecc.c:max_record_send_size
Unexecuted instantiation: groups.c:max_record_send_size
Unexecuted instantiation: mac.c:max_record_send_size
Unexecuted instantiation: protocols.c:max_record_send_size
Unexecuted instantiation: publickey.c:max_record_send_size
Unexecuted instantiation: secparams.c:max_record_send_size
Unexecuted instantiation: accelerated.c:max_record_send_size
Unexecuted instantiation: cryptodev.c:max_record_send_size
Unexecuted instantiation: x86-common.c:max_record_send_size
Unexecuted instantiation: gost28147.c:max_record_send_size
Unexecuted instantiation: init.c:max_record_send_size
Unexecuted instantiation: pk.c:max_record_send_size
Unexecuted instantiation: rnd.c:max_record_send_size
Unexecuted instantiation: rsa-keygen-fips186.c:max_record_send_size
Unexecuted instantiation: sysrng-linux.c:max_record_send_size
Unexecuted instantiation: tls1-prf.c:max_record_send_size
Unexecuted instantiation: compress.c:max_record_send_size
Unexecuted instantiation: dh.c:max_record_send_size
Unexecuted instantiation: x509_b64.c:max_record_send_size
Unexecuted instantiation: fingerprint.c:max_record_send_size
Unexecuted instantiation: tls-sig.c:max_record_send_size
Unexecuted instantiation: certs.c:max_record_send_size
Unexecuted instantiation: str-iconv.c:max_record_send_size
Unexecuted instantiation: str-unicode.c:max_record_send_size
Unexecuted instantiation: file.c:max_record_send_size
Unexecuted instantiation: pin.c:max_record_send_size
Unexecuted instantiation: dh-primes.c:max_record_send_size
Unexecuted instantiation: hello_ext_lib.c:max_record_send_size
Unexecuted instantiation: stek.c:max_record_send_size
Unexecuted instantiation: pathbuf.c:max_record_send_size
Unexecuted instantiation: psk_ext_parser.c:max_record_send_size
Unexecuted instantiation: anti_replay.c:max_record_send_size
Unexecuted instantiation: attributes.c:max_record_send_size
Unexecuted instantiation: email-verify.c:max_record_send_size
Unexecuted instantiation: ip.c:max_record_send_size
Unexecuted instantiation: krb5.c:max_record_send_size
Unexecuted instantiation: name_constraints.c:max_record_send_size
Unexecuted instantiation: anon.c:max_record_send_size
Unexecuted instantiation: anon_ecdh.c:max_record_send_size
Unexecuted instantiation: dhe.c:max_record_send_size
Unexecuted instantiation: dhe_psk.c:max_record_send_size
Unexecuted instantiation: ecdhe.c:max_record_send_size
Unexecuted instantiation: rsa.c:max_record_send_size
Unexecuted instantiation: rsa_psk.c:max_record_send_size
Unexecuted instantiation: vko_gost.c:max_record_send_size
Unexecuted instantiation: aes-cbc-x86-aesni.c:max_record_send_size
Unexecuted instantiation: aes-cbc-x86-ssse3.c:max_record_send_size
Unexecuted instantiation: aes-ccm-x86-aesni.c:max_record_send_size
Unexecuted instantiation: aes-gcm-padlock.c:max_record_send_size
Unexecuted instantiation: aes-gcm-x86-aesni.c:max_record_send_size
Unexecuted instantiation: aes-gcm-x86-pclmul-avx.c:max_record_send_size
Unexecuted instantiation: aes-gcm-x86-pclmul.c:max_record_send_size
Unexecuted instantiation: aes-gcm-x86-ssse3.c:max_record_send_size
Unexecuted instantiation: aes-padlock.c:max_record_send_size
Unexecuted instantiation: aes-xts-x86-aesni.c:max_record_send_size
Unexecuted instantiation: hmac-padlock.c:max_record_send_size
Unexecuted instantiation: hmac-x86-ssse3.c:max_record_send_size
Unexecuted instantiation: sha-padlock.c:max_record_send_size
Unexecuted instantiation: sha-x86-ssse3.c:max_record_send_size
Unexecuted instantiation: bignum-le.c:max_record_send_size
Unexecuted instantiation: dsa-compute-k.c:max_record_send_size
Unexecuted instantiation: dsa-keygen-fips186.c:max_record_send_size
Unexecuted instantiation: dsa-validate.c:max_record_send_size
Unexecuted instantiation: ecdsa-compute-k.c:max_record_send_size
Unexecuted instantiation: gostdsa-mask.c:max_record_send_size
Unexecuted instantiation: provable-prime.c:max_record_send_size
Unexecuted instantiation: vko.c:max_record_send_size
Unexecuted instantiation: gost_keywrap.c:max_record_send_size
Unexecuted instantiation: gost-wrap.c:max_record_send_size
1758
1759
/* Returns the during the handshake negotiated certificate type(s).
1760
 * See state.c for the full function documentation.
1761
 *
1762
 * This function is made static inline for optimization reasons.
1763
 */
1764
inline static gnutls_certificate_type_t
1765
get_certificate_type(gnutls_session_t session, gnutls_ctype_target_t target)
1766
0
{
1767
0
  switch (target) {
1768
0
  case GNUTLS_CTYPE_CLIENT:
1769
0
    return session->security_parameters.client_ctype;
1770
0
    break;
1771
0
  case GNUTLS_CTYPE_SERVER:
1772
0
    return session->security_parameters.server_ctype;
1773
0
    break;
1774
0
  case GNUTLS_CTYPE_OURS:
1775
0
    if (IS_SERVER(session)) {
1776
0
      return session->security_parameters.server_ctype;
1777
0
    } else {
1778
0
      return session->security_parameters.client_ctype;
1779
0
    }
1780
0
    break;
1781
0
  case GNUTLS_CTYPE_PEERS:
1782
0
    if (IS_SERVER(session)) {
1783
0
      return session->security_parameters.client_ctype;
1784
0
    } else {
1785
0
      return session->security_parameters.server_ctype;
1786
0
    }
1787
0
    break;
1788
0
  default: // Illegal parameter passed
1789
0
    return GNUTLS_CRT_UNKNOWN;
1790
0
  }
1791
0
}
Unexecuted instantiation: record.c:get_certificate_type
Unexecuted instantiation: debug.c:get_certificate_type
Unexecuted instantiation: cipher.c:get_certificate_type
Unexecuted instantiation: handshake-tls13.c:get_certificate_type
Unexecuted instantiation: mbuffers.c:get_certificate_type
Unexecuted instantiation: buffers.c:get_certificate_type
Unexecuted instantiation: handshake.c:get_certificate_type
Unexecuted instantiation: errors.c:get_certificate_type
Unexecuted instantiation: kx.c:get_certificate_type
Unexecuted instantiation: cipher-cbc.c:get_certificate_type
Unexecuted instantiation: priority.c:get_certificate_type
Unexecuted instantiation: hash_int.c:get_certificate_type
Unexecuted instantiation: cipher_int.c:get_certificate_type
Unexecuted instantiation: session.c:get_certificate_type
Unexecuted instantiation: db.c:get_certificate_type
Unexecuted instantiation: hello_ext.c:get_certificate_type
Unexecuted instantiation: auth.c:get_certificate_type
Unexecuted instantiation: sslv2_compat.c:get_certificate_type
Unexecuted instantiation: datum.c:get_certificate_type
Unexecuted instantiation: session_pack.c:get_certificate_type
Unexecuted instantiation: cert-cred.c:get_certificate_type
Unexecuted instantiation: global.c:get_certificate_type
Unexecuted instantiation: constate.c:get_certificate_type
Unexecuted instantiation: mem.c:get_certificate_type
Unexecuted instantiation: alert.c:get_certificate_type
Unexecuted instantiation: threads.c:get_certificate_type
Unexecuted instantiation: sockets.c:get_certificate_type
Unexecuted instantiation: system.c:get_certificate_type
Unexecuted instantiation: profiles.c:get_certificate_type
Unexecuted instantiation: str.c:get_certificate_type
Unexecuted instantiation: str-idna.c:get_certificate_type
Unexecuted instantiation: state.c:get_certificate_type
Unexecuted instantiation: cert-cred-x509.c:get_certificate_type
Unexecuted instantiation: supplemental.c:get_certificate_type
Unexecuted instantiation: random.c:get_certificate_type
Unexecuted instantiation: crypto-api.c:get_certificate_type
Unexecuted instantiation: privkey.c:get_certificate_type
Unexecuted instantiation: pcert.c:get_certificate_type
Unexecuted instantiation: pubkey.c:get_certificate_type
Unexecuted instantiation: dtls.c:get_certificate_type
Unexecuted instantiation: system_override.c:get_certificate_type
Unexecuted instantiation: crypto-backend.c:get_certificate_type
Unexecuted instantiation: fips.c:get_certificate_type
Unexecuted instantiation: safe-memfuncs.c:get_certificate_type
Unexecuted instantiation: atfork.c:get_certificate_type
Unexecuted instantiation: urls.c:get_certificate_type
Unexecuted instantiation: prf.c:get_certificate_type
Unexecuted instantiation: dh-session.c:get_certificate_type
Unexecuted instantiation: cert-session.c:get_certificate_type
Unexecuted instantiation: handshake-checks.c:get_certificate_type
Unexecuted instantiation: dtls-sw.c:get_certificate_type
Unexecuted instantiation: secrets.c:get_certificate_type
Unexecuted instantiation: extv.c:get_certificate_type
Unexecuted instantiation: ocsp-api.c:get_certificate_type
Unexecuted instantiation: iov.c:get_certificate_type
Unexecuted instantiation: ktls.c:get_certificate_type
Unexecuted instantiation: keys-dummy.c:get_certificate_type
Unexecuted instantiation: encrypted_extensions.c:get_certificate_type
Unexecuted instantiation: certificate_request.c:get_certificate_type
Unexecuted instantiation: certificate_verify.c:get_certificate_type
Unexecuted instantiation: tls13-sig.c:get_certificate_type
Unexecuted instantiation: finished.c:get_certificate_type
Unexecuted instantiation: key_update.c:get_certificate_type
Unexecuted instantiation: hello_retry.c:get_certificate_type
Unexecuted instantiation: session_ticket.c:get_certificate_type
Unexecuted instantiation: certificate.c:get_certificate_type
Unexecuted instantiation: early_data.c:get_certificate_type
Unexecuted instantiation: post_handshake.c:get_certificate_type
Unexecuted instantiation: common.c:get_certificate_type
Unexecuted instantiation: crl.c:get_certificate_type
Unexecuted instantiation: crq.c:get_certificate_type
Unexecuted instantiation: dn.c:get_certificate_type
Unexecuted instantiation: extensions.c:get_certificate_type
Unexecuted instantiation: hostname-verify.c:get_certificate_type
Unexecuted instantiation: key_decode.c:get_certificate_type
Unexecuted instantiation: key_encode.c:get_certificate_type
Unexecuted instantiation: mpi.c:get_certificate_type
Unexecuted instantiation: ocsp.c:get_certificate_type
Unexecuted instantiation: output.c:get_certificate_type
Unexecuted instantiation: pkcs12.c:get_certificate_type
Unexecuted instantiation: pkcs12_bag.c:get_certificate_type
Unexecuted instantiation: pkcs12_encr.c:get_certificate_type
Unexecuted instantiation: pkcs7-crypt.c:get_certificate_type
Unexecuted instantiation: privkey_openssl.c:get_certificate_type
Unexecuted instantiation: privkey_pkcs8.c:get_certificate_type
Unexecuted instantiation: privkey_pkcs8_pbes1.c:get_certificate_type
Unexecuted instantiation: prov-seed.c:get_certificate_type
Unexecuted instantiation: sign.c:get_certificate_type
Unexecuted instantiation: spki.c:get_certificate_type
Unexecuted instantiation: time.c:get_certificate_type
Unexecuted instantiation: tls_features.c:get_certificate_type
Unexecuted instantiation: verify-high.c:get_certificate_type
Unexecuted instantiation: verify-high2.c:get_certificate_type
Unexecuted instantiation: verify.c:get_certificate_type
Unexecuted instantiation: virt-san.c:get_certificate_type
Unexecuted instantiation: x509.c:get_certificate_type
Unexecuted instantiation: x509_dn.c:get_certificate_type
Unexecuted instantiation: x509_ext.c:get_certificate_type
Unexecuted instantiation: x509_write.c:get_certificate_type
Unexecuted instantiation: alpn.c:get_certificate_type
Unexecuted instantiation: client_cert_type.c:get_certificate_type
Unexecuted instantiation: compress_certificate.c:get_certificate_type
Unexecuted instantiation: cookie.c:get_certificate_type
Unexecuted instantiation: dumbfw.c:get_certificate_type
Unexecuted instantiation: ec_point_formats.c:get_certificate_type
Unexecuted instantiation: etm.c:get_certificate_type
Unexecuted instantiation: ext_master_secret.c:get_certificate_type
Unexecuted instantiation: heartbeat.c:get_certificate_type
Unexecuted instantiation: key_share.c:get_certificate_type
Unexecuted instantiation: max_record.c:get_certificate_type
Unexecuted instantiation: pre_shared_key.c:get_certificate_type
Unexecuted instantiation: psk_ke_modes.c:get_certificate_type
Unexecuted instantiation: record_size_limit.c:get_certificate_type
Unexecuted instantiation: safe_renegotiation.c:get_certificate_type
Unexecuted instantiation: server_cert_type.c:get_certificate_type
Unexecuted instantiation: server_name.c:get_certificate_type
Unexecuted instantiation: signature.c:get_certificate_type
Unexecuted instantiation: srtp.c:get_certificate_type
Unexecuted instantiation: status_request.c:get_certificate_type
Unexecuted instantiation: supported_groups.c:get_certificate_type
Unexecuted instantiation: supported_versions.c:get_certificate_type
Unexecuted instantiation: cert.c:get_certificate_type
Unexecuted instantiation: dh_common.c:get_certificate_type
Unexecuted instantiation: psk.c:get_certificate_type
Unexecuted instantiation: psk_passwd.c:get_certificate_type
Unexecuted instantiation: cert_types.c:get_certificate_type
Unexecuted instantiation: ciphers.c:get_certificate_type
Unexecuted instantiation: ciphersuites.c:get_certificate_type
Unexecuted instantiation: ecc.c:get_certificate_type
Unexecuted instantiation: groups.c:get_certificate_type
Unexecuted instantiation: mac.c:get_certificate_type
Unexecuted instantiation: protocols.c:get_certificate_type
Unexecuted instantiation: publickey.c:get_certificate_type
Unexecuted instantiation: secparams.c:get_certificate_type
Unexecuted instantiation: accelerated.c:get_certificate_type
Unexecuted instantiation: cryptodev.c:get_certificate_type
Unexecuted instantiation: x86-common.c:get_certificate_type
Unexecuted instantiation: gost28147.c:get_certificate_type
Unexecuted instantiation: init.c:get_certificate_type
Unexecuted instantiation: pk.c:get_certificate_type
Unexecuted instantiation: rnd.c:get_certificate_type
Unexecuted instantiation: rsa-keygen-fips186.c:get_certificate_type
Unexecuted instantiation: sysrng-linux.c:get_certificate_type
Unexecuted instantiation: tls1-prf.c:get_certificate_type
Unexecuted instantiation: compress.c:get_certificate_type
Unexecuted instantiation: dh.c:get_certificate_type
Unexecuted instantiation: x509_b64.c:get_certificate_type
Unexecuted instantiation: fingerprint.c:get_certificate_type
Unexecuted instantiation: tls-sig.c:get_certificate_type
Unexecuted instantiation: certs.c:get_certificate_type
Unexecuted instantiation: str-iconv.c:get_certificate_type
Unexecuted instantiation: str-unicode.c:get_certificate_type
Unexecuted instantiation: file.c:get_certificate_type
Unexecuted instantiation: pin.c:get_certificate_type
Unexecuted instantiation: dh-primes.c:get_certificate_type
Unexecuted instantiation: hello_ext_lib.c:get_certificate_type
Unexecuted instantiation: stek.c:get_certificate_type
Unexecuted instantiation: pathbuf.c:get_certificate_type
Unexecuted instantiation: psk_ext_parser.c:get_certificate_type
Unexecuted instantiation: anti_replay.c:get_certificate_type
Unexecuted instantiation: attributes.c:get_certificate_type
Unexecuted instantiation: email-verify.c:get_certificate_type
Unexecuted instantiation: ip.c:get_certificate_type
Unexecuted instantiation: krb5.c:get_certificate_type
Unexecuted instantiation: name_constraints.c:get_certificate_type
Unexecuted instantiation: anon.c:get_certificate_type
Unexecuted instantiation: anon_ecdh.c:get_certificate_type
Unexecuted instantiation: dhe.c:get_certificate_type
Unexecuted instantiation: dhe_psk.c:get_certificate_type
Unexecuted instantiation: ecdhe.c:get_certificate_type
Unexecuted instantiation: rsa.c:get_certificate_type
Unexecuted instantiation: rsa_psk.c:get_certificate_type
Unexecuted instantiation: vko_gost.c:get_certificate_type
Unexecuted instantiation: aes-cbc-x86-aesni.c:get_certificate_type
Unexecuted instantiation: aes-cbc-x86-ssse3.c:get_certificate_type
Unexecuted instantiation: aes-ccm-x86-aesni.c:get_certificate_type
Unexecuted instantiation: aes-gcm-padlock.c:get_certificate_type
Unexecuted instantiation: aes-gcm-x86-aesni.c:get_certificate_type
Unexecuted instantiation: aes-gcm-x86-pclmul-avx.c:get_certificate_type
Unexecuted instantiation: aes-gcm-x86-pclmul.c:get_certificate_type
Unexecuted instantiation: aes-gcm-x86-ssse3.c:get_certificate_type
Unexecuted instantiation: aes-padlock.c:get_certificate_type
Unexecuted instantiation: aes-xts-x86-aesni.c:get_certificate_type
Unexecuted instantiation: hmac-padlock.c:get_certificate_type
Unexecuted instantiation: hmac-x86-ssse3.c:get_certificate_type
Unexecuted instantiation: sha-padlock.c:get_certificate_type
Unexecuted instantiation: sha-x86-ssse3.c:get_certificate_type
Unexecuted instantiation: bignum-le.c:get_certificate_type
Unexecuted instantiation: dsa-compute-k.c:get_certificate_type
Unexecuted instantiation: dsa-keygen-fips186.c:get_certificate_type
Unexecuted instantiation: dsa-validate.c:get_certificate_type
Unexecuted instantiation: ecdsa-compute-k.c:get_certificate_type
Unexecuted instantiation: gostdsa-mask.c:get_certificate_type
Unexecuted instantiation: provable-prime.c:get_certificate_type
Unexecuted instantiation: vko.c:get_certificate_type
Unexecuted instantiation: gost_keywrap.c:get_certificate_type
Unexecuted instantiation: gost-wrap.c:get_certificate_type
1792
1793
/* Macros to aide constant time/mem checks */
1794
0
#define CONSTCHECK_NOT_EQUAL(a, b) ((-((uint32_t)(a) ^ (uint32_t)(b))) >> 31)
1795
0
#define CONSTCHECK_EQUAL(a, b) (1U - CONSTCHECK_NOT_EQUAL(a, b))
1796
1797
extern unsigned int _gnutls_global_version;
1798
1799
bool _gnutls_config_is_ktls_enabled(void);
1800
bool _gnutls_config_is_rsa_pkcs1_encrypt_allowed(void);
1801
1802
#endif /* GNUTLS_LIB_GNUTLS_INT_H */