Coverage Report

Created: 2026-08-14 07:19

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