Skip to content

How to Set TLS version for TLS::Stream? #2966

Answered by reneme
fasxmut asked this question in Q&A
Discussion options

You must be logged in to vote

That is indeed true. The current implementation of the asio stream will always offer the latest supported version of the library. The stream is meant to be a (more or less) drop-in replacement for Boost's TLS stream implementation based on OpenSSL. Hence, I would like to keep the interface of Stream::handshake and Stream::async_handshake stable.

I suggest to to add a configuration in the Context class (which already allows setting the SNI and a certificate verification callback) and that is used to instantiate a stream. Simply adding a Context::set_version_to_offer(Protocol_Version) method and acting upon it accordingly in the stream should do the trick.

Also: Please refer to those reposi…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@fasxmut
Comment options

Answer selected by fasxmut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants