Coverage Report

Created: 2026-05-16 07:57

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