174#define TLS_VERSION_TLS_1_1 0x0302
177#define TLS_VERSION_TLS_1_2 0x0303
180#define TLS_VERSION_TLS_1_3 0x0304
183#define TLS_VERSION_BASE TLS_VERSION_TLS_1_1
207#define TLS_DESCR_COUNT( desc ) \
209 ( sizeof ( struct desc ) / sizeof ( union tls_ptr_len ) ) + \
211 ( 0 * sizeof ( int[ -( sizeof ( struct desc ) % \
212 sizeof ( union tls_ptr_len ) ) ] ) ) )
220#define TLS_DESCR_MAPPING( desc ) \
221 const uint8_t desc ## _map [ 1 + \
222 TLS_DESCR_COUNT ( desc ) ]
229#define TLS_MAPSZ( desc ) \
230 [0] = ( 1 + TLS_DESCR_COUNT ( desc ) )
239#define TLS_INDEX( desc, field ) \
243 ( offsetof ( struct desc, field ) / \
244 sizeof ( union tls_ptr_len ) ) + \
246 ( 0 * sizeof ( int[ -( offsetof ( struct desc, field ) % \
247 sizeof ( union tls_ptr_len ) ) ] ) ) )
256#define TLS_EXTNS( desc, field ) \
257 ( ( sizeof ( ( ( struct desc * ) NULL )->field ) - \
258 sizeof ( ( ( struct desc * ) NULL )->field.all ) ) \
259 / sizeof ( struct tls_cursor ) )
268#define TLS_FIXED( desc, version, field ) \
270 [ TLS_INDEX ( desc, field ) ] = \
271 ( ( (version) - TLS_VERSION_BASE ) + \
272 ( ( sizeof ( *( ( ( struct desc * ) NULL )->field ) ) \
284#define TLS_VARIABLE( desc, version, field, bits, extns ) \
286 [ TLS_INDEX ( desc, field ) ] = \
287 ( ( (version) - TLS_VERSION_BASE ) + ( 1 << 2 ) ), \
289 [ TLS_INDEX ( desc, field ) + 1 ] = \
290 ( ( ( (bits) + 7 ) / 8 ) + ( (extns) << 2 ) )
299#define TLS_EXTRA( desc, version, field ) \
300 TLS_VARIABLE ( desc, version, field, 0, 0 )
309#define TLS_VAR08( desc, version, field ) \
310 TLS_VARIABLE ( desc, (version), field, 8, 0 )
319#define TLS_VAR16( desc, version, field ) \
320 TLS_VARIABLE ( desc, (version), field, 16, 0 )
329#define TLS_VAR24( desc, version, field ) \
330 TLS_VARIABLE ( desc, (version), field, 24, 0 )
339#define TLS_EXT16( desc, version, field ) \
340 TLS_VARIABLE ( desc, (version), field.all, 16, \
341 ( TLS_EXTNS ( desc, field ) + 1 ) )
350#define TLS_EXTND( desc, extension, field ) \
351 [ TLS_INDEX ( desc, field ) ] = \
352 ( ( (extension) >> 8 ) ^ 0xff ), \
353 [ TLS_INDEX ( desc, field ) + 1 ] = \
354 ( ( (extension) & 0xff ) ^ 0xff )
362#define TLS_MAP_MIN( byte ) ( TLS_VERSION_BASE + ( (byte) & 0x03 ) )
370#define TLS_MAP_FIXED( byte ) ( ( (byte) >> 2 ) - 1 )
378#define TLS_MAP_LEN_LEN( byte ) ( (byte) & 0x03 )
381#define TLS_MAP_LEN_LEN_MAX 3
389#define TLS_MAP_EXTENSIONS( byte ) ( ( (byte) >> 2 ) - 1 )
705 build_assert ( ( (
const void * ) &
u->tls.data ) == &
u->asn1.data );
733#define tls_parse( type, version, cursor, desc ) \
734 tls_parse_map ( type ## _map, (version), (cursor), \
735 ( ( union tls_ptr_len * ) \
736 ( (desc) == ( ( struct type * ) NULL ) ? \
737 (desc) : (desc) ) ) )
748#define tls_parse_opt( type, version, cursor, desc ) \
749 tls_parse_opt_map ( type ## _map, (version), (cursor), \
750 ( ( union tls_ptr_len * ) \
751 ( (desc) == ( ( struct type * ) NULL ) ? \
752 (desc) : (desc) ) ) )
763#define tls_build( type, version, desc, cursor ) \
764 tls_build_map ( type ## _map, (version), \
765 ( ( union tls_ptr_len * ) \
766 ( (desc) == ( ( struct type * ) NULL ) ? \
767 (desc) : (desc) ) ), (cursor) )
778#define tls_size( type, version, desc, cursor ) \
779 tls_size_map ( type ## _map, (version), \
780 ( ( union tls_ptr_len * ) \
781 ( (desc) == ( ( struct type * ) NULL ) ? \
782 (desc) : (desc) ) ), (cursor) )
typeof(acpi_finder=acpi_find)
ACPI table finder.
#define build_assert(condition)
Assert a condition at build time (after dead code elimination).
u32 version
Driver version.
union @104331263140136355135267063077374276003064103115 u
uint16_t ext
Extended status.
struct ena_llq_option desc
Descriptor counts.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
static __always_inline int struct dma_mapping * map
#define container_of(ptr, type, field)
Get containing structure.
CertificateEntry descriptor.
struct tls_cursor next
Next certificate.
struct tls_cursor all
All extensions.
struct tls_cursor cert
Certificate data.
struct tls_cursor list
Certificate list.
struct tls_cursor context
Certificate request context.
struct tls_cursor frag
Maximum fragment length extension.
struct tls_cursor sigs
Signature algorithms extension.
struct tls_cursor cookie
Cookie extension.
struct tls_client_hello::@300242163101377353070067133352065270331266023376 * a
Fixed portion.
struct tls_cursor pskmodes
Preshared key modes extension.
struct tls_cursor keys
Key share extension.
struct tls_cursor groups
Supported groups extension.
struct tls_cursor all
All extensions.
uint8_t random[32]
Client random bytes.
struct tls_cursor reneg
Renegotiation information extension.
struct tls_cursor compression
Compression methods.
uint16_t version
Offered version.
struct tls_cursor record
Record size limit extension.
struct tls_cursor suites
Cipher suites.
struct tls_cursor ems
Extended master secret extension.
struct tls_cursor ticket
Session ticket extension.
struct tls_cursor supvers
Supported versions extension.
struct tls_cursor session_id
Session ID.
struct tls_cursor names
Server name indication extension.
ClientKeyExchange descriptor (for DHE).
struct tls_cursor dh_yc
Public key.
ClientKeyExchange descriptor (for ECDHE).
struct tls_cursor point
Curve point.
ClientKeyExchange descriptor (for key transport).
struct tls_cursor enc
Encrypted pre-master secret.
A TLS variable-length data cursor.
size_t len
Length of data.
DigitallySigned descriptor.
uint16_t * sig_hash
Signature and hash algorithm.
struct tls_cursor sig
Signature.
struct tls_cursor data
Extension data.
struct tls_cursor next
Next extension.
uint16_t * type
Extension type.
KeyShareClientHello descriptor.
struct tls_cursor list
Key share list.
KeyShareEntry descriptor.
struct tls_cursor next
Next key share.
uint16_t * group
Named group.
struct tls_cursor public
Public key.
KeyShareHelloRetryRequest descriptor.
uint16_t * group
Named group.
KeyShareServerHello descriptor.
uint16_t * group
Named group.
struct tls_cursor public
Public key.
MaxFragmentLength descriptor.
uint8_t * max
Maximum fragment length.
NamedGroupList descriptor.
struct tls_cursor list
Named group list.
NewSessionTicket descriptor.
struct tls_cursor all
All extensions.
uint32_t * age
Age obfuscation.
struct tls_cursor ticket
Ticket.
struct tls_cursor nonce
Nonce.
uint32_t * lifetime
Lifetime hint.
PskKeyExchangeModes descriptor.
struct tls_cursor list
Mode list.
RenegotiationInfo descriptor.
struct tls_cursor verify
Verification data from previous Finished.
ServerHelloDone descriptor.
struct tls_cursor key
Key share extension.
struct tls_cursor all
All extensions.
uint8_t compression
Selected compression method.
struct tls_cursor cookie
Cookie extension.
struct tls_server_hello::@161027372353017270343224204013300325065157134244 * b
Second fixed-length portion.
struct tls_cursor session_id
Session ID.
struct tls_cursor ems
Extended master secret extension.
uint8_t random[32]
Server random bytes.
uint16_t version
Selected version.
struct tls_server_hello::@103274354304025060212205334334227305117174114135 * a
First fixed-length portion.
uint16_t suite
Selected cipher suite.
struct tls_cursor reneg
Renegotiation information extension.
struct tls_cursor supver
Supported versions extension.
ServerKeyExchange descriptor (for DHE).
struct tls_cursor dsig
Signature.
struct tls_cursor dh_ys
Public key.
struct tls_cursor dh_g
Generator.
struct tls_cursor dh_p
Prime modulus.
ServerKeyExchange descriptor (for ECDHE).
struct tls_server_key_exchange_ecdhe::@335121145353041211061272202142307345103264367317 * curve
Curve parameters.
uint16_t group
Named group.
struct tls_cursor dsig
Signature.
struct tls_cursor point
Curve point.
ServerNameList descriptor.
struct tls_cursor list
Server name list.
struct tls_cursor name
Host name.
SignatureSchemeList descriptor.
struct tls_cursor list
Supported signature algorithm list.
SupportedVersions descriptor (in ServerHello).
uint16_t * selected
Selected version.
SupportedVersions descriptor (in ClientHello).
struct tls_cursor list
Supported version list.
int tls_build_map(const uint8_t *map, unsigned int version, union tls_ptr_len *desc, struct tls_cursor *cursor)
Build TLS data structure.
static const struct asn1_cursor * tls_asn1(const struct tls_cursor *cursor)
Get ASN.1 cursor from TLS cursor.
int tls_size_map(const uint8_t *map, unsigned int version, union tls_ptr_len *desc, struct tls_cursor *cursor)
Calculate length of TLS data structure.
#define TLS_DESCR_MAPPING(desc)
Binary encoding of a descriptor structure mapping.
int tls_parse_opt_map(const uint8_t *map, unsigned int version, const struct tls_cursor *cursor, union tls_ptr_len *desc)
Parse optional TLS data structure.
int tls_parse_map(const uint8_t *map, unsigned int version, const struct tls_cursor *cursor, union tls_ptr_len *desc)
Parse TLS data structure.
ClientKeyExchange descriptor (unified).
struct tls_client_key_exchange_ecdhe ecdhe
ClientKeyExchange descriptor (for ECDHE).
struct tls_cursor cursor
ClientKeyExchange descriptor (common format).
struct tls_client_key_exchange_pubkey pubkey
ClientKeyExchange descriptor (for key transport).
struct tls_client_key_exchange_dhe dhe
ClientKeyExchange descriptor (for DHE).
union tls_ptr_len desc[0]
Raw pointer/length array.
KeyShareServerHello/KeyShareHelloRetryRequest combined descriptor.
union tls_ptr_len desc[0]
Raw pointer/length array.
uint16_t * group
Named group (present in both).
struct tls_key_share_hello_retry_request hrr
KeyShareHelloRetryRequest descriptor.
struct tls_key_share_server_hello hello
KeyShareServerHello descriptor.