Coverage Report

Created: 2024-06-20 06:28

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