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
10FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11FILE_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/x509.h>
19#include <ipxe/privkey.h>
20#include <ipxe/pending.h>
21#include <ipxe/iobuf.h>
22#include <ipxe/tables.h>
23#include <ipxe/channel.h>
24#include <ipxe/tlskey.h>
25
26struct tls_connection;
27
28/** A TLS header */
29struct 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/** TLS version 1.3 */
51#define TLS_VERSION_TLS_1_3 0x0304
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 alert descriptions */
86#define TLS_ALERT_CLOSE_NOTIFY 0
87
88/* TLS cipher specifications */
89#define TLS_RSA_WITH_NULL_MD5 0x0001
90#define TLS_RSA_WITH_NULL_SHA 0x0002
91#define TLS_RSA_WITH_AES_128_CBC_SHA 0x002f
92#define TLS_DHE_RSA_WITH_AES_128_CBC_SHA 0x0033
93#define TLS_RSA_WITH_AES_256_CBC_SHA 0x0035
94#define TLS_DHE_RSA_WITH_AES_256_CBC_SHA 0x0039
95#define TLS_RSA_WITH_AES_128_CBC_SHA256 0x003c
96#define TLS_RSA_WITH_AES_256_CBC_SHA256 0x003d
97#define TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 0x0067
98#define TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 0x006b
99#define TLS_RSA_WITH_AES_128_GCM_SHA256 0x009c
100#define TLS_RSA_WITH_AES_256_GCM_SHA384 0x009d
101#define TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 0x009e
102#define TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 0x009f
103#define TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA 0xc009
104#define TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA 0xc00a
105#define TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA 0xc013
106#define TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA 0xc014
107#define TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 0xc023
108#define TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 0xc024
109#define TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 0xc027
110#define TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 0xc028
111#define TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 0xc02b
112#define TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 0xc02c
113#define TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 0xc02f
114#define TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 0xc030
115
116/* TLS signature hash algorithm identifiers */
117#define TLS_RSA_SHA1_ALGORITHM 0x0201
118#define TLS_RSA_SHA224_ALGORITHM 0x0301
119#define TLS_ECDSA_SHA224_ALGORITHM 0x0303
120#define TLS_RSA_SHA256_ALGORITHM 0x0401
121#define TLS_ECDSA_SHA256_ALGORITHM 0x0403
122#define TLS_RSA_SHA384_ALGORITHM 0x0501
123#define TLS_ECDSA_SHA384_ALGORITHM 0x0503
124#define TLS_RSA_SHA512_ALGORITHM 0x0601
125#define TLS_ECDSA_SHA512_ALGORITHM 0x0603
126#define TLS_RSA_PSS_RSAE_SHA256_ALGORITHM 0x0804
127#define TLS_RSA_PSS_RSAE_SHA384_ALGORITHM 0x0805
128#define TLS_RSA_PSS_RSAE_SHA512_ALGORITHM 0x0806
129#define TLS_RSA_PSS_PSS_SHA256_ALGORITHM 0x0809
130#define TLS_RSA_PSS_PSS_SHA384_ALGORITHM 0x080a
131#define TLS_RSA_PSS_PSS_SHA512_ALGORITHM 0x080b
132
133/* TLS server name extension */
134#define TLS_SERVER_NAME 0
135#define TLS_SERVER_NAME_HOST_NAME 0
136
137/* TLS maximum fragment length extension */
138#define TLS_MAX_FRAGMENT_LENGTH 1
139#define TLS_MAX_FRAGMENT_LENGTH_512 1
140#define TLS_MAX_FRAGMENT_LENGTH_1024 2
141#define TLS_MAX_FRAGMENT_LENGTH_2048 3
142#define TLS_MAX_FRAGMENT_LENGTH_4096 4
143
144/* TLS named key exchange group extension */
145#define TLS_NAMED_GROUP 10
146#define TLS_NAMED_GROUP_SECP256R1 23
147#define TLS_NAMED_GROUP_SECP384R1 24
148#define TLS_NAMED_GROUP_X25519 29
149#define TLS_NAMED_GROUP_FFDHE2048 256
150#define TLS_NAMED_GROUP_FFDHE3072 257
151#define TLS_NAMED_GROUP_FFDHE4096 258
152
153/* TLS signature algorithms extension */
154#define TLS_SIGNATURE_ALGORITHMS 13
155
156/* TLS extended master secret extension */
157#define TLS_EXTENDED_MASTER_SECRET 23
158
159/* TLS session ticket extension */
160#define TLS_SESSION_TICKET 35
161
162/* TLS renegotiation information extension */
163#define TLS_RENEGOTIATION_INFO 0xff01
164
165/** TLS authentication header */
167 /** Sequence number */
169 /** TLS header */
171} __attribute__ (( packed ));
172
173/** TLS verification data */
175 /** Client verification data */
177 /** Server verification data */
179} __attribute__ (( packed ));
180
181/** TLS RX state machine state */
186
187/** TLS TX pending flags */
196
197/** TLS key exchange parameters */
199 /** Length of parameters (excluding trailing signature) */
200 size_t len;
201 /** Key exchange algorithm */
203 /** Partner key */
204 const void *partner;
205 /** Length of partner key */
207};
208
209/** A TLS key exchange algorithm */
211 /** Algorithm name */
212 const char *name;
213 /** Default key exchange algorithm */
215 /**
216 * Parse key exchange parameters from Server Key Exchange record
217 *
218 * @v tls TLS connection
219 * @v data Server Key Exchange handshake record
220 * @v len Length of Server Key Exchange handshake record
221 * @v params Key exchange parameters to fill in
222 * @ret rc Return status code
223 */
224 int ( * parse ) ( struct tls_connection *tls,
225 const void *data, size_t len,
226 struct tls_key_exchange_parameters *params );
227 /** Length of length field in Client Key Exchange record */
229};
230
231/**
232 * A TLS cipher suite
233 *
234 * All algorithm fields must be defined. If the cipher suite does not
235 * use the algorithm in question, then the null version of that
236 * algorithm must be used (e.g. @c &digest_null for AEAD ciphers that
237 * have no MAC digest algorithm).
238 */
240 /** Key exchange algorithm */
242 /** Public-key encryption algorithm */
244 /** Bulk encryption cipher algorithm */
246 /** MAC digest algorithm */
248 /** Handshake digest algorithm (for TLSv1.2 and above) */
250 /** Numeric code (in network-endian order) */
252 /** Key length */
254 /** Fixed initialisation vector length */
256 /** Record initialisation vector length */
258 /** MAC length */
260};
261
262/** TLS cipher suite table */
263#define TLS_CIPHER_SUITES \
264 __table ( struct tls_cipher_suite, "tls_cipher_suites" )
265
266/** Declare a TLS cipher suite */
267#define __tls_cipher_suite( pref ) \
268 __table_entry ( TLS_CIPHER_SUITES, pref )
269
270/** TLS named curve type */
271#define TLS_NAMED_CURVE_TYPE 3
272
273/** A TLS named group */
275 /** Key exchange algorithm */
277 /** Numeric code (in network-endian order) */
279};
280
281/** TLS named group table */
282#define TLS_NAMED_GROUPS \
283 __table ( struct tls_named_group, "tls_named_groups" )
284
285/** Declare a TLS named group */
286#define __tls_named_group( pref ) \
287 __table_entry ( TLS_NAMED_GROUPS, pref )
288
289/** Declare a TLS anonymous named group */
290#define __tls_anon_named_group __tls_named_group ( 98 )
291
292/** Number of non-anonymous TLS named groups */
293#define TLS_NUM_NAMED_GROUPS \
294 ( ( unsigned int ) \
295 ( __table_entries ( TLS_NAMED_GROUPS, 97 ) \
296 - table_start ( TLS_NAMED_GROUPS ) ) )
297
298/** A TLS cipher specification */
300 /** Cipher suite */
302 /** Dynamically-allocated storage */
303 void *dynamic;
304 /** Cipher key */
306 /** MAC secret */
308 /** Fixed initialisation vector */
309 void *fixed_iv;
310};
311
312/** A TLS cipher specification pair */
314 /** Writer endpoint */
315 const struct tls_endpoint *writer;
316 /** Current cipher specification */
318 /** Next cipher specification */
320};
321
322/** A TLS signature algorithm */
324 /** Digest algorithm */
326 /** Public-key algorithm */
328 /** Required certificate OID-identified algorithm */
330 /** Numeric code (in network-endian order) */
332};
333
334/** TLS signature hash algorithm table
335 *
336 * Note that the default (TLSv1.1 and earlier) algorithm using
337 * MD5+SHA1 is never explicitly specified.
338 */
339#define TLS_SIG_HASH_ALGORITHMS \
340 __table ( struct tls_signature_hash_algorithm, \
341 "tls_sig_hash_algorithms" )
342
343/** Declare a TLS signature hash algorithm */
344#define __tls_sig_hash_algorithm \
345 __table_entry ( TLS_SIG_HASH_ALGORITHMS, 01 )
346
347/** A TLS session ID */
349 /** ID */
351 /** Length of ID */
353};
354
355/** A TLS session ticket */
357 /** Ticket data */
358 void *data;
359 /** Length of ticket data */
360 size_t len;
361};
362
363/** A TLS session */
365 /** Reference counter */
367 /** List of sessions */
369
370 /** Server name */
371 const char *name;
372 /** Root of trust */
374 /** Private key */
376
377 /** Bound peer identity */
379 /** Pre-shared key */
381 /** Session ID */
383 /** Session ticket */
385
386 /** List of connections */
388};
389
390/** TLS transmit state */
391struct tls_tx {
392 /** Cipher specifications */
394 /** Sequence number */
396 /** Pending transmissions */
397 unsigned int pending;
398 /** Transmit process */
400};
401
402/** TLS receive state */
403struct tls_rx {
404 /** Cipher specifications */
406 /** Sequence number */
408 /** State machine current state */
410 /** Current received record header */
412 /** Current received record header (static I/O buffer) */
414 /** List of received data buffers */
416 /** Received handshake fragment (if any) */
418};
419
420/** TLS client state */
422 /** Private key */
424 /** Certificate chain (if any) */
426 /** Security negotiation pending operation */
428};
429
430/** TLS server state */
432 /** Root of trust */
434 /** Certificate chain (if any) */
436 /** Certificate validator */
438 /** Certificate validation pending operation */
440 /** Security negotiation pending operation */
442};
443
444/** A TLS connection */
446 /** Reference counter */
448
449 /** Session */
451 /** List of connections within the same session */
453 /** New session ID (if any) */
455 /** New session ticket (if any) */
457
458 /** Plaintext stream */
460 /** Ciphertext stream */
462
463 /** Protocol version */
465 /** Key exchange algorithm */
467 /** Secure renegotiation flag */
469 /** Extended master secret flag */
471 /** Verification data */
473
474 /** Secure channel */
476 /** Key schedule */
478 /** Transmit state */
479 struct tls_tx tx;
480 /** Receive state */
481 struct tls_rx rx;
482 /** Client state */
484 /** Server state */
486};
487
488/** Advertised maximum fragment length */
489#define TLS_MAX_FRAGMENT_LENGTH_VALUE TLS_MAX_FRAGMENT_LENGTH_4096
490
491/** TX maximum fragment length
492 *
493 * TLS requires us to limit our transmitted records to the maximum
494 * fragment length that we attempt to negotiate, even if the server
495 * does not respect this choice.
496 */
497#define TLS_TX_BUFSIZE 4096
498
499/** RX I/O buffer size
500 *
501 * The maximum fragment length extension is optional, and many common
502 * implementations (including OpenSSL) do not support it. We must
503 * therefore be prepared to receive records of up to 16kB in length.
504 * The chance of an allocation of this size failing is non-negligible,
505 * so we must split received data into smaller allocations.
506 */
507#define TLS_RX_BUFSIZE 4096
508
509/** Minimum RX I/O buffer size
510 *
511 * To simplify manipulations, we ensure that no RX I/O buffer is
512 * smaller than this size. This allows us to assume that the MAC and
513 * padding are entirely contained within the final I/O buffer.
514 */
515#define TLS_RX_MIN_BUFSIZE 512
516
517/** RX I/O buffer alignment */
518#define TLS_RX_ALIGN 16
519
521
526
527extern int add_tls ( struct interface *xfer, const char *name,
528 struct x509_root *root, struct private_key *key );
529
530#endif /* _IPXE_TLS_H */
union @162305117151260234136356364136041353210355154177 key
unsigned short uint16_t
Definition stdint.h:11
unsigned long long uint64_t
Definition stdint.h:13
unsigned char uint8_t
Definition stdint.h:10
const char * name
Definition ath9k_hw.c:1986
Secure channel abstraction.
ring len
Length.
Definition dwmac.h:226
uint8_t data[48]
Additional event data.
Definition ena.h:11
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:921
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:951
#define __attribute__(x)
Definition compiler.h:10
Cryptographic API.
Object interfaces.
I/O buffers.
Pending operations.
Private key.
Processes.
Reference counting.
struct stp_switch root
Root switch.
Definition stp.h:15
An ASN.1 OID-identified algorithm.
Definition asn1.h:429
A cipher algorithm.
Definition crypto.h:58
A message digest algorithm.
Definition crypto.h:19
A key exchange algorithm.
Definition crypto.h:210
An object interface.
Definition interface.h:125
A persistent I/O buffer.
Definition iobuf.h:98
A doubly-linked list entry (or list head).
Definition list.h:19
A pending operation.
Definition pending.h:14
A private key.
Definition privkey.h:17
A public key algorithm.
Definition crypto.h:142
A secure channel.
Definition channel.h:72
A pre-shared bound peer identity.
Definition channel.h:97
TLS authentication header.
Definition tls.h:166
uint64_t seq
Sequence number.
Definition tls.h:168
struct tls_header header
TLS header.
Definition tls.h:170
A TLS cipher suite.
Definition tls.h:239
uint8_t fixed_iv_len
Fixed initialisation vector length.
Definition tls.h:255
struct cipher_algorithm * cipher
Bulk encryption cipher algorithm.
Definition tls.h:245
struct pubkey_algorithm * pubkey
Public-key encryption algorithm.
Definition tls.h:243
uint8_t key_len
Key length.
Definition tls.h:253
uint8_t mac_len
MAC length.
Definition tls.h:259
uint8_t record_iv_len
Record initialisation vector length.
Definition tls.h:257
struct digest_algorithm * digest
MAC digest algorithm.
Definition tls.h:247
struct tls_key_exchange_algorithm * exchange
Key exchange algorithm.
Definition tls.h:241
uint16_t code
Numeric code (in network-endian order).
Definition tls.h:251
struct digest_algorithm * handshake
Handshake digest algorithm (for TLSv1.2 and above).
Definition tls.h:249
A TLS cipher specification pair.
Definition tls.h:313
struct tls_cipherspec pending
Next cipher specification.
Definition tls.h:319
struct tls_cipherspec active
Current cipher specification.
Definition tls.h:317
const struct tls_endpoint * writer
Writer endpoint.
Definition tls.h:315
A TLS cipher specification.
Definition tls.h:299
void * fixed_iv
Fixed initialisation vector.
Definition tls.h:309
void * cipher_key
Cipher key.
Definition tls.h:305
struct tls_cipher_suite * suite
Cipher suite.
Definition tls.h:301
void * dynamic
Dynamically-allocated storage.
Definition tls.h:303
void * mac_secret
MAC secret.
Definition tls.h:307
TLS client state.
Definition tls.h:421
struct private_key * key
Private key.
Definition tls.h:423
struct x509_chain * chain
Certificate chain (if any).
Definition tls.h:425
struct pending_operation negotiation
Security negotiation pending operation.
Definition tls.h:427
A TLS connection.
Definition tls.h:445
struct interface cipherstream
Ciphertext stream.
Definition tls.h:461
struct tls_session * session
Session.
Definition tls.h:450
struct tls_server server
Server state.
Definition tls.h:485
struct tls_key_schedule key
Key schedule.
Definition tls.h:477
struct tls_rx rx
Receive state.
Definition tls.h:481
struct tls_session_ticket new_ticket
New session ticket (if any).
Definition tls.h:456
struct tls_verify_data verify
Verification data.
Definition tls.h:472
struct secure_channel channel
Secure channel.
Definition tls.h:475
struct interface plainstream
Plaintext stream.
Definition tls.h:459
struct tls_tx tx
Transmit state.
Definition tls.h:479
struct exchange_algorithm * exchange
Key exchange algorithm.
Definition tls.h:466
int extended_master_secret
Extended master secret flag.
Definition tls.h:470
struct list_head list
List of connections within the same session.
Definition tls.h:452
struct tls_client client
Client state.
Definition tls.h:483
uint16_t version
Protocol version.
Definition tls.h:464
struct tls_session_id new_id
New session ID (if any).
Definition tls.h:454
struct refcnt refcnt
Reference counter.
Definition tls.h:447
int secure_renegotiation
Secure renegotiation flag.
Definition tls.h:468
A TLS endpoint.
Definition tlskey.h:19
A TLS header.
Definition tls.h:29
uint16_t version
Protocol version.
Definition tls.h:39
uint16_t length
Length of payload.
Definition tls.h:41
uint8_t type
Content type.
Definition tls.h:34
A TLS key exchange algorithm.
Definition tls.h:210
const char * name
Algorithm name.
Definition tls.h:212
struct exchange_algorithm * exchange
Default key exchange algorithm.
Definition tls.h:214
int(* parse)(struct tls_connection *tls, const void *data, size_t len, struct tls_key_exchange_parameters *params)
Parse key exchange parameters from Server Key Exchange record.
Definition tls.h:224
uint8_t len_len
Length of length field in Client Key Exchange record.
Definition tls.h:228
TLS key exchange parameters.
Definition tls.h:198
struct exchange_algorithm * exchange
Key exchange algorithm.
Definition tls.h:202
size_t len
Length of parameters (excluding trailing signature).
Definition tls.h:200
size_t partner_len
Length of partner key.
Definition tls.h:206
const void * partner
Partner key.
Definition tls.h:204
A TLS key schedule.
Definition tlskey.h:100
A TLS named group.
Definition tls.h:274
uint16_t code
Numeric code (in network-endian order).
Definition tls.h:278
struct exchange_algorithm * exchange
Key exchange algorithm.
Definition tls.h:276
A TLS pre-shared key.
Definition tlskey.h:128
TLS receive state.
Definition tls.h:403
struct tls_cipherspec_pair cipherspec
Cipher specifications.
Definition tls.h:405
struct list_head data
List of received data buffers.
Definition tls.h:415
struct io_buffer iobuf
Current received record header (static I/O buffer).
Definition tls.h:413
struct io_buffer * handshake
Received handshake fragment (if any).
Definition tls.h:417
enum tls_rx_state state
State machine current state.
Definition tls.h:409
struct tls_header header
Current received record header.
Definition tls.h:411
uint64_t seq
Sequence number.
Definition tls.h:407
TLS server state.
Definition tls.h:431
struct pending_operation validation
Certificate validation pending operation.
Definition tls.h:439
struct interface validator
Certificate validator.
Definition tls.h:437
struct x509_root * root
Root of trust.
Definition tls.h:433
struct pending_operation negotiation
Security negotiation pending operation.
Definition tls.h:441
struct x509_chain * chain
Certificate chain (if any).
Definition tls.h:435
A TLS session ID.
Definition tls.h:348
uint8_t len
Length of ID.
Definition tls.h:352
uint8_t data[32]
ID.
Definition tls.h:350
A TLS session ticket.
Definition tls.h:356
void * data
Ticket data.
Definition tls.h:358
size_t len
Length of ticket data.
Definition tls.h:360
A TLS session.
Definition tls.h:364
struct private_key * key
Private key.
Definition tls.h:375
const char * name
Server name.
Definition tls.h:371
struct secure_preshared_identity psid
Bound peer identity.
Definition tls.h:378
struct x509_root * root
Root of trust.
Definition tls.h:373
struct tls_preshared_key psk
Pre-shared key.
Definition tls.h:380
struct list_head conn
List of connections.
Definition tls.h:387
struct refcnt refcnt
Reference counter.
Definition tls.h:366
struct tls_session_ticket ticket
Session ticket.
Definition tls.h:384
struct tls_session_id id
Session ID.
Definition tls.h:382
struct list_head list
List of sessions.
Definition tls.h:368
A TLS signature algorithm.
Definition tls.h:323
struct asn1_algorithm * algorithm
Required certificate OID-identified algorithm.
Definition tls.h:329
struct pubkey_algorithm * pubkey
Public-key algorithm.
Definition tls.h:327
uint16_t code
Numeric code (in network-endian order).
Definition tls.h:331
struct digest_algorithm * digest
Digest algorithm.
Definition tls.h:325
TLS transmit state.
Definition tls.h:391
uint64_t seq
Sequence number.
Definition tls.h:395
unsigned int pending
Pending transmissions.
Definition tls.h:397
struct tls_cipherspec_pair cipherspec
Cipher specifications.
Definition tls.h:393
struct process process
Transmit process.
Definition tls.h:399
TLS verification data.
Definition tls.h:174
uint8_t client[12]
Client verification data.
Definition tls.h:176
uint8_t server[12]
Server verification data.
Definition tls.h:178
An X.509 certificate chain.
Definition x509.h:201
An X.509 root certificate list.
Definition x509.h:375
Linker tables.
struct tls_key_exchange_algorithm tls_null_exchange_algorithm
Null key exchange algorithm.
Definition tls.c:865
struct tls_key_exchange_algorithm tls_pubkey_exchange_algorithm
Public key exchange algorithm.
Definition tls.c:873
struct tls_key_exchange_algorithm tls_ecdhe_exchange_algorithm
Ephemeral Elliptic Curve Diffie-Hellman key exchange algorithm.
Definition tls.c:1003
struct tls_key_exchange_algorithm tls_dhe_exchange_algorithm
Ephemeral Diffie-Hellman key exchange algorithm.
Definition tls.c:944
tls_rx_state
TLS RX state machine state.
Definition tls.h:182
@ TLS_RX_HEADER
Definition tls.h:183
@ TLS_RX_DATA
Definition tls.h:184
tls_tx_pending
TLS TX pending flags.
Definition tls.h:188
@ TLS_TX_FINISHED
Definition tls.h:194
@ TLS_TX_CLIENT_KEY_EXCHANGE
Definition tls.h:191
@ TLS_TX_CLIENT_HELLO
Definition tls.h:189
@ TLS_TX_CHANGE_CIPHER
Definition tls.h:193
@ TLS_TX_CERTIFICATE_VERIFY
Definition tls.h:192
@ TLS_TX_CERTIFICATE
Definition tls.h:190
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:4119
struct exchange_algorithm tls_classic_pre_master_algorithm
Classic pre-master secret key exchange algorithm.
Definition tlsclassic.c:101
TLS key schedules.
X.509 certificates.