-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add support for overriding the TLS clientSupported member in TLSSettingsSimple #3
Conversation
…ngsSimple This is so we can manipulate these TLS settings even when using a connection manager like the http-client package does. See kazu-yamamoto#2 for details.
I tested this and it seems to work fine with http-client when I set a suitably configure global connection manager. |
Network/Connection/Types.hs
Outdated
@@ -75,12 +75,15 @@ data TLSSettings | |||
-- will always re-established their context. | |||
-- Not Implemented Yet. | |||
, settingUseServerName :: Bool -- ^ Use server name extension. Not Implemented Yet. | |||
, settingClientSupported :: Maybe TLS.Supported |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why Maybe
is used. I think that Supported
is simply good enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, now that you say it, I think you are right.
The Maybe wasn't actually necessary.
(I can squash the commits when you are done with reviewing) |
LGTM. |
Yes, perfectly fine. Thanks! |
Merged. Thanks! |
I am trying to update
https://github.com/mrkkrp/req/actions/runs/9155853746/job/25169229880?pr=169#step:9:217 This is a test that used to pass. Do you think it is related? If so, am I doing something wrong? Here is the change I'm testing: |
I think this is indeed related. Passing |
See e.g. https://hub.darcs.net/darcs/darcs-screened/browse/src/Darcs/Util/HTTP.hs#168 for the painful way. |
defaultSupported :: Supported
defaultSupported =
Supported
{ supportedVersions = [TLS13, TLS12]
, supportedCiphers = []
, supportedCompressions = [nullCompression]
, supportedHashSignatures = Struct.supportedSignatureSchemes
, supportedSecureRenegotiation = True
, supportedClientInitiatedRenegotiation = False
, supportedExtendedMainSecret = RequireEMS
, supportedSession = True
, supportedFallbackScsv = True
, supportedEmptyPacket = True
, supportedGroups = supportedNamedGroups
} Unfortunately, You might ask why But I guess this design can be changed. If users want this, I will take time to try to implement it. |
It appeared that this change is quite easy. |
Hi @kazu-yamamoto I have no option on the design of the library since I am not familiar with it. That said, of course it would be nice if the problem went away "automatically" :-) |
# CHANGELOG ## Version 0.4.3 * Creating the `Internal` module and export the `ConnectionContext` constructor. [#7](kazu-yamamoto/crypton-connection#7) ## Version 0.4.2 * Using data-default. ## Version 0.4.1 * Preparing for tls v2.1 ## Version 0.4.0 * Add support for overriding the TLS clientSupported member in TLSSettingsSimple [#3](kazu-yamamoto/crypton-connection#3)
This is so we can manipulate these TLS settings even when using a connection manager like the http-client package does. See
#2 for details.