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