feat(tls): expose trust_anchors and grease_sigalgs_enabled by TimeTREE98 · Pull Request #651 · 0x676e67/wreq-python · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions python/wreq/tls.py
14 changes: 14 additions & 0 deletions src/tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ define_enum!(
NEXT_PROTO_NEG,
CHANNEL_ID,
RECORD_SIZE_LIMIT,
TRUST_ANCHORS,
);

/// A builder for [`TlsOptions`].
Expand Down Expand Up @@ -215,6 +216,12 @@ struct Builder {

/// Overrides the random AES hardware acceleration.
random_aes_hw_override: Option<bool>,

/// Whether the `signature_algorithms` extension includes a GREASE value.
grease_sigalgs_enabled: Option<bool>,

/// Encoded Trust Anchor IDs sent in a TLS 1.3 ClientHello.
trust_anchors: Option<Vec<u8>>,
}

/// TLS connection configuration options.
Expand Down Expand Up @@ -382,6 +389,13 @@ impl TlsOptions {
params.random_aes_hw_override,
random_aes_hw_override
);
apply_option!(
set_if_some,
builder,
params.grease_sigalgs_enabled,
grease_sigalgs_enabled
);
apply_option!(set_if_some, builder, params.trust_anchors, trust_anchors);
}

Self(builder.build())
Expand Down
12 changes: 11 additions & 1 deletion tests/tls_test.py
Loading