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