-
Notifications
You must be signed in to change notification settings - Fork 259
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
Getting client certificate #783
Conversation
warp/Network/Wai/Handler/Warp.hs
Outdated
-- | ||
-- Since 3.3.5 | ||
clientCertificate :: Request -> Maybe CertificateChain | ||
clientCertificate = fromMaybe (throw (userError "getClientCertificate")) . Vault.lookup getClientCertificateKey . vault |
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.
What's the motivation for using a bottom value here instead of propagating the Maybe
? If we need to distinguish different cases, I'd rather a specific sum type to represent the different ways things can fail.
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.
Oh. It's from copy-and-paste. Does the following code make sense?
clientCertificate :: Request -> Maybe CertificateChain
clientCertificate = join . Vault.lookup getClientCertificateKey . vault
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.
Yup, seems reasonable.
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.
Thanks. I pushed this. Can we merge this PR now?
I think the version bump has broken all of CI. Do you want me to take a crack at fixing that before we merge? |
No rush. Now I think we should wait for getting tls 1.5.3 released. |
af2432a
to
8d7c182
Compare
8d7c182
to
f828294
Compare
New versions of |
@kazu-yamamoto did the package that provides the
I've pushed my attempted CI fixes to this branch. |
I compared v1.5.2 and v1.5.3 but there is no change for exporting. Very strange. @ocheron Any thoughts? |
Apparently it's needed in the benchmark module too but wasn't added. |
@ocheron Wow! Nice catch! Thanks. Hoping that CI will recover. |
@snoyberg Should we also add |
Yes, good call. I've pushed a bunch of updates on the branch, including updates to the stack.yaml files and a lower bound in warp-tls. I've also improved the build matrix a bit by dropping 8.0.2 (no longer supported) and adding in 8.8.1 testing. |
@kazu-yamamoto woohoo, looks like CI passed! |
@snoyberg Thanks! I have merged this PR. |
I have released new versions of warp and warp-tls. |
This should fix #482.
See also: