summaryrefslogtreecommitdiff
path: root/src/regress/lib/libssl
diff options
context:
space:
mode:
authortb <>2020-12-01 07:46:02 +0000
committertb <>2020-12-01 07:46:02 +0000
commit7e83d137a386213a28873ba8555b80f3902047ea (patch)
treeb8860cebc16a52f900f9938beabf8efa53dbe3c1 /src/regress/lib/libssl
parente184d9b4d57f92ba4003625ca5e4bf386ad6843f (diff)
downloadopenbsd-7e83d137a386213a28873ba8555b80f3902047ea.tar.gz
openbsd-7e83d137a386213a28873ba8555b80f3902047ea.tar.bz2
openbsd-7e83d137a386213a28873ba8555b80f3902047ea.zip
Bring back *_client_method() structs
The method unification broke an API promise of SSL_is_server(). According to the documentation, calling SSL_is_server() on SSL objects constructed from generic and server methods would result in 1 even before any call to SSL_set_accept_state(). This means the information needs to be available when SSL_new() is called, so must come from the method itself. Prior to the method unification, s->server would be set to 0 or 1 in SSL_new() depending on whether the accept method was undefined or not. Instead, introduce a flag to the internal structs to distinguish client methods from server and generic methods and copy that flag to s->server in SSL_new(). This problem was reported to otto due to breakage of DoH in net/dnsdist. The reason for this is that www/h2o relies on SSL_is_server() to decide whether to call SSL_accept() or SSL_connect(). Thus, the h2o server would end up responding to a ClientHello with another ClientHello, which results in a handshake failure. The bandaid applied to www/h2o can be removed once this fix has made it into snaps. No other breakage is known. This commit brings back only about half of the duplication removed in the method unification, so is preferable to a full revert. ok jsing
Diffstat (limited to 'src/regress/lib/libssl')
0 files changed, 0 insertions, 0 deletions