iPXE
tls.h
Go to the documentation of this file.
1 #ifndef _IPXE_TLS_H
2 #define _IPXE_TLS_H
3 
4 /**
5  * @file
6  *
7  * Transport Layer Security Protocol
8  */
9 
10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11 FILE_SECBOOT ( PERMITTED );
12 
13 #include <stdint.h>
14 #include <ipxe/refcnt.h>
15 #include <ipxe/interface.h>
16 #include <ipxe/process.h>
17 #include <ipxe/crypto.h>
18 #include <ipxe/md5.h>
19 #include <ipxe/sha1.h>
20 #include <ipxe/x509.h>
21 #include <ipxe/privkey.h>
22 #include <ipxe/pending.h>
23 #include <ipxe/iobuf.h>
24 #include <ipxe/tables.h>
25 
26 struct tls_connection;
27 
28 /** A TLS header */
29 struct tls_header {
30  /** Content type
31  *
32  * This is a TLS_TYPE_XXX constant
33  */
35  /** Protocol version
36  *
37  * This is a TLS_VERSION_XXX constant
38  */
40  /** Length of payload */
42 } __attribute__ (( packed ));
43 
44 /** TLS version 1.1 */
45 #define TLS_VERSION_TLS_1_1 0x0302
46 
47 /** TLS version 1.2 */
48 #define TLS_VERSION_TLS_1_2 0x0303
49 
50 /** Maximum supported TLS version */
51 #define TLS_VERSION_MAX TLS_VERSION_TLS_1_2
52 
53 /** Change cipher content type */
54 #define TLS_TYPE_CHANGE_CIPHER 20
55 
56 /** Change cipher spec magic byte */
57 #define TLS_CHANGE_CIPHER_SPEC 1
58 
59 /** Alert content type */
60 #define TLS_TYPE_ALERT 21
61 
62 /** Handshake content type */
63 #define TLS_TYPE_HANDSHAKE 22
64 
65 /** Application data content type */
66 #define TLS_TYPE_DATA 23
67 
68 /* Handshake message types */
69 #define TLS_HELLO_REQUEST 0
70 #define TLS_CLIENT_HELLO 1
71 #define TLS_SERVER_HELLO 2
72 #define TLS_NEW_SESSION_TICKET 4
73 #define TLS_CERTIFICATE 11
74 #define TLS_SERVER_KEY_EXCHANGE 12
75 #define TLS_CERTIFICATE_REQUEST 13
76 #define TLS_SERVER_HELLO_DONE 14
77 #define TLS_CERTIFICATE_VERIFY 15
78 #define TLS_CLIENT_KEY_EXCHANGE 16
79 #define TLS_FINISHED 20
80 
81 /* TLS alert levels */
82 #define TLS_ALERT_WARNING 1
83 #define TLS_ALERT_FATAL 2
84 
85 /* TLS cipher specifications */
86 #define TLS_RSA_WITH_NULL_MD5 0x0001
87 #define TLS_RSA_WITH_NULL_SHA 0x0002
88 #define TLS_RSA_WITH_AES_128_CBC_SHA 0x002f
89 #define TLS_DHE_RSA_WITH_AES_128_CBC_SHA 0x0033
90 #define TLS_RSA_WITH_AES_256_CBC_SHA 0x0035
91 #define TLS_DHE_RSA_WITH_AES_256_CBC_SHA 0x0039
92 #define TLS_RSA_WITH_AES_128_CBC_SHA256 0x003c
93 #define TLS_RSA_WITH_AES_256_CBC_SHA256 0x003d
94 #define TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 0x0067
95 #define TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 0x006b
96 #define TLS_RSA_WITH_AES_128_GCM_SHA256 0x009c
97 #define TLS_RSA_WITH_AES_256_GCM_SHA384 0x009d
98 #define TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 0x009e
99 #define TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 0x009f
100 #define TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA 0xc009
101 #define TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA 0xc00a
102 #define TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA 0xc013
103 #define TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA 0xc014
104 #define TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 0xc023
105 #define TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 0xc024
106 #define TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 0xc027
107 #define TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 0xc028
108 #define TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 0xc02b
109 #define TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 0xc02c
110 #define TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 0xc02f
111 #define TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 0xc030
112 
113 /* TLS hash algorithm identifiers */
114 #define TLS_MD5_ALGORITHM 1
115 #define TLS_SHA1_ALGORITHM 2
116 #define TLS_SHA224_ALGORITHM 3
117 #define TLS_SHA256_ALGORITHM 4
118 #define TLS_SHA384_ALGORITHM 5
119 #define TLS_SHA512_ALGORITHM 6
120 
121 /* TLS signature algorithm identifiers */
122 #define TLS_RSA_ALGORITHM 1
123 #define TLS_ECDSA_ALGORITHM 3
124 
125 /* TLS server name extension */
126 #define TLS_SERVER_NAME 0
127 #define TLS_SERVER_NAME_HOST_NAME 0
128 
129 /* TLS maximum fragment length extension */
130 #define TLS_MAX_FRAGMENT_LENGTH 1
131 #define TLS_MAX_FRAGMENT_LENGTH_512 1
132 #define TLS_MAX_FRAGMENT_LENGTH_1024 2
133 #define TLS_MAX_FRAGMENT_LENGTH_2048 3
134 #define TLS_MAX_FRAGMENT_LENGTH_4096 4
135 
136 /* TLS named curve extension */
137 #define TLS_NAMED_CURVE 10
138 #define TLS_NAMED_CURVE_SECP256R1 23
139 #define TLS_NAMED_CURVE_SECP384R1 24
140 #define TLS_NAMED_CURVE_X25519 29
141 
142 /* TLS signature algorithms extension */
143 #define TLS_SIGNATURE_ALGORITHMS 13
144 
145 /* TLS extended master secret extension */
146 #define TLS_EXTENDED_MASTER_SECRET 23
147 
148 /* TLS session ticket extension */
149 #define TLS_SESSION_TICKET 35
150 
151 /* TLS renegotiation information extension */
152 #define TLS_RENEGOTIATION_INFO 0xff01
153 
154 /** TLS authentication header */
156  /** Sequence number */
158  /** TLS header */
160 } __attribute__ (( packed ));
161 
162 /** TLS verification data */
164  /** Client verification data */
166  /** Server verification data */
168 } __attribute__ (( packed ));
169 
170 /** TLS RX state machine state */
174 };
175 
176 /** TLS TX pending flags */
183  TLS_TX_FINISHED = 0x0020,
184 };
185 
186 /** A TLS key exchange algorithm */
188  /** Algorithm name */
189  const char *name;
190  /**
191  * Transmit Client Key Exchange record
192  *
193  * @v tls TLS connection
194  * @ret rc Return status code
195  */
196  int ( * exchange ) ( struct tls_connection *tls );
197 };
198 
199 /** A TLS cipher suite */
201  /** Key exchange algorithm */
203  /** Public-key encryption algorithm */
205  /** Bulk encryption cipher algorithm */
207  /** MAC digest algorithm */
209  /** Handshake digest algorithm (for TLSv1.2 and above) */
211  /** Numeric code (in network-endian order) */
213  /** Key length */
215  /** Fixed initialisation vector length */
217  /** Record initialisation vector length */
219  /** MAC length */
221 };
222 
223 /** TLS cipher suite table */
224 #define TLS_CIPHER_SUITES \
225  __table ( struct tls_cipher_suite, "tls_cipher_suites" )
226 
227 /** Declare a TLS cipher suite */
228 #define __tls_cipher_suite( pref ) \
229  __table_entry ( TLS_CIPHER_SUITES, pref )
230 
231 /** TLS named curved type */
232 #define TLS_NAMED_CURVE_TYPE 3
233 
234 /** TLS uncompressed curve point format */
235 #define TLS_POINT_FORMAT_UNCOMPRESSED 4
236 
237 /** A TLS named curve */
239  /** Elliptic curve */
241  /** Numeric code (in network-endian order) */
243  /** Curve point format byte (if any) */
245  /** Pre-master secret length */
247 };
248 
249 /** TLS named curve table */
250 #define TLS_NAMED_CURVES \
251  __table ( struct tls_named_curve, "tls_named_curves" )
252 
253 /** Declare a TLS named curve */
254 #define __tls_named_curve( pref ) \
255  __table_entry ( TLS_NAMED_CURVES, pref )
256 
257 /** A TLS cipher specification */
259  /** Cipher suite */
261  /** Dynamically-allocated storage */
262  void *dynamic;
263  /** Bulk encryption cipher context */
264  void *cipher_ctx;
265  /** MAC secret */
266  void *mac_secret;
267  /** Fixed initialisation vector */
268  void *fixed_iv;
269 };
270 
271 /** A TLS cipher specification pair */
273  /** Current cipher specification */
275  /** Next cipher specification */
277 };
278 
279 /** A TLS signature and hash algorithm identifier */
281  /** Hash algorithm */
283  /** Signature algorithm */
285 } __attribute__ (( packed ));
286 
287 /** A TLS signature algorithm */
289  /** Digest algorithm */
291  /** Public-key algorithm */
293  /** Numeric code */
295 };
296 
297 /** TLS signature hash algorithm table
298  *
299  * Note that the default (TLSv1.1 and earlier) algorithm using
300  * MD5+SHA1 is never explicitly specified.
301  */
302 #define TLS_SIG_HASH_ALGORITHMS \
303  __table ( struct tls_signature_hash_algorithm, \
304  "tls_sig_hash_algorithms" )
305 
306 /** Declare a TLS signature hash algorithm */
307 #define __tls_sig_hash_algorithm \
308  __table_entry ( TLS_SIG_HASH_ALGORITHMS, 01 )
309 
310 /** TLS client random data */
312  /** GMT Unix time */
314  /** Random data */
316 } __attribute__ (( packed ));
317 
318 /** An MD5+SHA1 context */
320  /** MD5 context */
322  /** SHA-1 context */
324 } __attribute__ (( packed ));
325 
326 /** MD5+SHA1 context size */
327 #define MD5_SHA1_CTX_SIZE sizeof ( struct md5_sha1_context )
328 
329 /** An MD5+SHA1 digest */
331  /** MD5 digest */
333  /** SHA-1 digest */
335 } __attribute__ (( packed ));
336 
337 /** MD5+SHA1 digest size */
338 #define MD5_SHA1_DIGEST_SIZE sizeof ( struct md5_sha1_digest )
339 
340 /** A TLS session */
341 struct tls_session {
342  /** Reference counter */
343  struct refcnt refcnt;
344  /** List of sessions */
345  struct list_head list;
346 
347  /** Server name */
348  const char *name;
349  /** Root of trust */
350  struct x509_root *root;
351  /** Private key */
352  struct private_key *key;
353 
354  /** Session ID */
355  uint8_t id[32];
356  /** Length of session ID */
357  size_t id_len;
358  /** Session ticket */
359  void *ticket;
360  /** Length of session ticket */
361  size_t ticket_len;
362  /** Master secret */
364  /** Extended master secret flag */
366 
367  /** List of connections */
368  struct list_head conn;
369 };
370 
371 /** TLS transmit state */
372 struct tls_tx {
373  /** Cipher specifications */
375  /** Sequence number */
377  /** Pending transmissions */
378  unsigned int pending;
379  /** Transmit process */
380  struct process process;
381 };
382 
383 /** TLS receive state */
384 struct tls_rx {
385  /** Cipher specifications */
387  /** Sequence number */
389  /** State machine current state */
391  /** Current received record header */
393  /** Current received record header (static I/O buffer) */
394  struct io_buffer iobuf;
395  /** List of received data buffers */
396  struct list_head data;
397  /** Received handshake fragment */
399 };
400 
401 /** TLS client state */
402 struct tls_client {
403  /** Random bytes */
405  /** Private key (if used) */
406  struct private_key *key;
407  /** Certificate chain (if used) */
408  struct x509_chain *chain;
409  /** Security negotiation pending operation */
411 };
412 
413 /** TLS server state */
414 struct tls_server {
415  /** Random bytes */
417  /** Server Key Exchange record (if any) */
418  void *exchange;
419  /** Server Key Exchange record length */
420  size_t exchange_len;
421  /** Root of trust */
422  struct x509_root *root;
423  /** Certificate chain */
424  struct x509_chain *chain;
425  /** Public key (within server certificate) */
426  struct asn1_cursor key;
427  /** Certificate validator */
429  /** Certificate validation pending operation */
431  /** Security negotiation pending operation */
433 };
434 
435 /** A TLS connection */
437  /** Reference counter */
438  struct refcnt refcnt;
439 
440  /** Session */
442  /** List of connections within the same session */
443  struct list_head list;
444  /** Session ID */
446  /** Length of session ID */
448  /** New session ticket */
450  /** Length of new session ticket */
452 
453  /** Plaintext stream */
455  /** Ciphertext stream */
457 
458  /** Protocol version */
460  /** Master secret */
462  /** Digest algorithm used for handshake verification */
464  /** Digest algorithm context used for handshake verification */
466  /** Secure renegotiation flag */
468  /** Extended master secret flag */
470  /** Verification data */
472 
473  /** Transmit state */
474  struct tls_tx tx;
475  /** Receive state */
476  struct tls_rx rx;
477  /** Client state */
479  /** Server state */
481 };
482 
483 /** Advertised maximum fragment length */
484 #define TLS_MAX_FRAGMENT_LENGTH_VALUE TLS_MAX_FRAGMENT_LENGTH_4096
485 
486 /** TX maximum fragment length
487  *
488  * TLS requires us to limit our transmitted records to the maximum
489  * fragment length that we attempt to negotiate, even if the server
490  * does not respect this choice.
491  */
492 #define TLS_TX_BUFSIZE 4096
493 
494 /** RX I/O buffer size
495  *
496  * The maximum fragment length extension is optional, and many common
497  * implementations (including OpenSSL) do not support it. We must
498  * therefore be prepared to receive records of up to 16kB in length.
499  * The chance of an allocation of this size failing is non-negligible,
500  * so we must split received data into smaller allocations.
501  */
502 #define TLS_RX_BUFSIZE 4096
503 
504 /** Minimum RX I/O buffer size
505  *
506  * To simplify manipulations, we ensure that no RX I/O buffer is
507  * smaller than this size. This allows us to assume that the MAC and
508  * padding are entirely contained within the final I/O buffer.
509  */
510 #define TLS_RX_MIN_BUFSIZE 512
511 
512 /** RX I/O buffer alignment */
513 #define TLS_RX_ALIGN 16
514 
518 
519 extern int add_tls ( struct interface *xfer, const char *name,
520  struct x509_root *root, struct private_key *key );
521 
522 #endif /* _IPXE_TLS_H */
struct tls_verify_data verify
Verification data.
Definition: tls.h:471
A process.
Definition: process.h:18
#define __attribute__(x)
Definition: compiler.h:10
struct tls_header header
Current received record header.
Definition: tls.h:392
int extended_master_secret
Extended master secret flag.
Definition: tls.h:365
struct digest_algorithm * digest
Digest algorithm.
Definition: tls.h:290
uint8_t random[32]
Random bytes.
Definition: tls.h:416
uint64_t seq
Sequence number.
Definition: tls.h:157
const char * name
Definition: ath9k_hw.c:1986
unsigned short uint16_t
Definition: stdint.h:11
An MD5+SHA1 context.
Definition: tls.h:319
uint8_t sha1[SHA1_DIGEST_SIZE]
SHA-1 digest.
Definition: tls.h:334
struct asn1_cursor key
Public key (within server certificate)
Definition: tls.h:426
A TLS cipher specification pair.
Definition: tls.h:272
struct tls_session * session
Session.
Definition: tls.h:441
uint8_t master_secret[48]
Master secret.
Definition: tls.h:363
struct list_head data
List of received data buffers.
Definition: tls.h:396
struct tls_key_exchange_algorithm * exchange
Key exchange algorithm.
Definition: tls.h:202
uint8_t md5[MD5_DIGEST_SIZE]
MD5 digest.
Definition: tls.h:332
uint8_t record_iv_len
Record initialisation vector length.
Definition: tls.h:218
struct io_buffer * handshake
Received handshake fragment.
Definition: tls.h:398
struct stp_switch root
Root switch.
Definition: stp.h:27
struct pending_operation negotiation
Security negotiation pending operation.
Definition: tls.h:410
TLS server state.
Definition: tls.h:414
struct tls_cipherspec_pair cipherspec
Cipher specifications.
Definition: tls.h:386
uint8_t type
Content type.
Definition: tls.h:34
I/O buffers.
TLS client state.
Definition: tls.h:402
struct tls_key_exchange_algorithm tls_dhe_exchange_algorithm
Ephemeral Diffie-Hellman key exchange algorithm.
Definition: tls.c:1701
void * exchange
Server Key Exchange record (if any)
Definition: tls.h:418
size_t new_session_ticket_len
Length of new session ticket.
Definition: tls.h:451
uint8_t session_id[32]
Session ID.
Definition: tls.h:445
struct tls_key_exchange_algorithm tls_pubkey_exchange_algorithm
Public key exchange algorithm.
Definition: tls.c:1486
uint16_t length
Length of payload.
Definition: tls.h:41
unsigned long long uint64_t
Definition: stdint.h:13
Cryptographic API.
TLS authentication header.
Definition: tls.h:155
A TLS cipher specification.
Definition: tls.h:258
const char * name
Algorithm name.
Definition: tls.h:189
struct tls_key_exchange_algorithm tls_ecdhe_exchange_algorithm
Ephemeral Elliptic Curve Diffie-Hellman key exchange algorithm.
Definition: tls.c:1831
struct pubkey_algorithm * pubkey
Public-key encryption algorithm.
Definition: tls.h:204
TLS receive state.
Definition: tls.h:384
A doubly-linked list entry (or list head)
Definition: list.h:19
A reference counter.
Definition: refcnt.h:27
A certificate validator.
Definition: validator.c:65
Private key.
struct private_key * key
Private key (if used)
Definition: tls.h:406
struct tls_server server
Server state.
Definition: tls.h:480
FILE_SECBOOT(PERMITTED)
An X.509 certificate chain.
Definition: x509.h:201
uint8_t * handshake_ctx
Digest algorithm context used for handshake verification.
Definition: tls.h:465
int(* exchange)(struct tls_connection *tls)
Transmit Client Key Exchange record.
Definition: tls.h:196
TLS transmit state.
Definition: tls.h:372
size_t id_len
Length of session ID.
Definition: tls.h:357
An object interface.
Definition: interface.h:125
void * new_session_ticket
New session ticket.
Definition: tls.h:449
struct tls_client client
Client state.
Definition: tls.h:478
void * cipher_ctx
Bulk encryption cipher context.
Definition: tls.h:264
int extended_master_secret
Extended master secret flag.
Definition: tls.h:469
tls_tx_pending
TLS TX pending flags.
Definition: tls.h:177
Object interfaces.
struct tls_cipher_suite * suite
Cipher suite.
Definition: tls.h:260
TLS verification data.
Definition: tls.h:163
struct digest_algorithm * digest
MAC digest algorithm.
Definition: tls.h:208
struct list_head list
List of connections within the same session.
Definition: tls.h:443
uint32_t gmt_unix_time
GMT Unix time.
Definition: tls.h:313
uint8_t fixed_iv_len
Fixed initialisation vector length.
Definition: tls.h:216
A TLS cipher suite.
Definition: tls.h:200
A TLS signature algorithm.
Definition: tls.h:288
size_t ticket_len
Length of session ticket.
Definition: tls.h:361
uint8_t master_secret[48]
Master secret.
Definition: tls.h:461
struct list_head list
List of sessions.
Definition: tls.h:345
struct tls_cipherspec_pair cipherspec
Cipher specifications.
Definition: tls.h:374
uint8_t pre_master_secret_len
Pre-master secret length.
Definition: tls.h:246
struct tls_header header
TLS header.
Definition: tls.h:159
uint64_t seq
Sequence number.
Definition: tls.h:376
struct interface cipherstream
Ciphertext stream.
Definition: tls.h:456
struct pending_operation negotiation
Security negotiation pending operation.
Definition: tls.h:432
uint8_t hash
Hash algorithm.
Definition: tls.h:282
void * ticket
Session ticket.
Definition: tls.h:359
struct elliptic_curve * curve
Elliptic curve.
Definition: tls.h:240
struct x509_chain * chain
Certificate chain.
Definition: tls.h:424
#define MD5_CTX_SIZE
MD5 context size.
Definition: md5.h:67
uint8_t mac_len
MAC length.
Definition: tls.h:220
Processes.
struct pending_operation validation
Certificate validation pending operation.
Definition: tls.h:430
unsigned char uint8_t
Definition: stdint.h:10
uint8_t signature
Signature algorithm.
Definition: tls.h:284
X.509 certificates.
unsigned int pending
Pending transmissions.
Definition: tls.h:378
struct tls_cipherspec pending
Next cipher specification.
Definition: tls.h:276
unsigned int uint32_t
Definition: stdint.h:12
struct tls_rx rx
Receive state.
Definition: tls.h:476
int add_tls(struct interface *xfer, const char *name, struct x509_root *root, struct private_key *key)
Add TLS on an interface.
Definition: tls.c:3962
struct tls_signature_hash_id code
Numeric code.
Definition: tls.h:294
enum tls_rx_state state
State machine current state.
Definition: tls.h:390
uint8_t client[12]
Client verification data.
Definition: tls.h:165
An MD5+SHA1 digest.
Definition: tls.h:330
An X.509 root certificate list.
Definition: x509.h:375
A TLS header.
Definition: tls.h:29
struct tls_tx tx
Transmit state.
Definition: tls.h:474
Pending operations.
struct digest_algorithm * handshake_digest
Digest algorithm used for handshake verification.
Definition: tls.h:463
uint8_t random[28]
Random data.
Definition: tls.h:315
uint64_t seq
Sequence number.
Definition: tls.h:388
uint16_t code
Numeric code (in network-endian order)
Definition: tls.h:242
An elliptic curve.
Definition: crypto.h:178
A TLS session.
Definition: tls.h:341
#define SHA1_DIGEST_SIZE
Definition: Tpm20.h:26
SHA-1 algorithm.
uint8_t sha1[SHA1_CTX_SIZE]
SHA-1 context.
Definition: tls.h:323
struct io_buffer iobuf
Current received record header (static I/O buffer)
Definition: tls.h:394
struct digest_algorithm * handshake
Handshake digest algorithm (for TLSv1.2 and above)
Definition: tls.h:210
tls_rx_state
TLS RX state machine state.
Definition: tls.h:171
#define SHA1_CTX_SIZE
SHA-1 context size.
Definition: sha1.h:67
struct x509_chain * chain
Certificate chain (if used)
Definition: tls.h:408
uint16_t version
Protocol version.
Definition: tls.h:39
A message digest algorithm.
Definition: crypto.h:19
Reference counting.
uint16_t version
Protocol version.
Definition: tls.h:459
struct tls_cipherspec active
Current cipher specification.
Definition: tls.h:274
A cipher algorithm.
Definition: crypto.h:51
A private key.
Definition: privkey.h:17
uint8_t server[12]
Server verification data.
Definition: tls.h:167
Linker tables.
A TLS key exchange algorithm.
Definition: tls.h:187
struct x509_root * root
Root of trust.
Definition: tls.h:350
A TLS connection.
Definition: tls.h:436
struct private_key * key
Private key.
Definition: tls.h:352
#define MD5_DIGEST_SIZE
MD5 digest size.
Definition: md5.h:73
struct tls_client_random random
Random bytes.
Definition: tls.h:404
A pending operation.
Definition: pending.h:14
uint8_t md5[MD5_CTX_SIZE]
MD5 context.
Definition: tls.h:321
struct cipher_algorithm * cipher
Bulk encryption cipher algorithm.
Definition: tls.h:206
struct list_head conn
List of connections.
Definition: tls.h:368
int secure_renegotiation
Secure renegotiation flag.
Definition: tls.h:467
A TLS named curve.
Definition: tls.h:238
struct pubkey_algorithm * pubkey
Public-key algorithm.
Definition: tls.h:292
void * dynamic
Dynamically-allocated storage.
Definition: tls.h:262
const char * name
Server name.
Definition: tls.h:348
A TLS signature and hash algorithm identifier.
Definition: tls.h:280
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
size_t exchange_len
Server Key Exchange record length.
Definition: tls.h:420
size_t session_id_len
Length of session ID.
Definition: tls.h:447
struct interface plainstream
Plaintext stream.
Definition: tls.h:454
MD5 algorithm.
TLS client random data.
Definition: tls.h:311
An ASN.1 object cursor.
Definition: asn1.h:21
A public key algorithm.
Definition: crypto.h:122
uint8_t format
Curve point format byte (if any)
Definition: tls.h:244
void * fixed_iv
Fixed initialisation vector.
Definition: tls.h:268
union @391 key
Sense key.
Definition: scsi.h:18
uint16_t code
Numeric code (in network-endian order)
Definition: tls.h:212
void * mac_secret
MAC secret.
Definition: tls.h:266
A persistent I/O buffer.
Definition: iobuf.h:38
struct x509_root * root
Root of trust.
Definition: tls.h:422
uint8_t key_len
Key length.
Definition: tls.h:214