Skip to content

Commit

Permalink
api: create AuthDialer and ProtocolDialer
Browse files Browse the repository at this point in the history
To disable SSL by default we want to transfer
`OpenSslDialer` to the go-openssl repository.
In order to do so, we need to minimize the amount of
copy-paste of the private functions.

`AuthDialer` is created as a dialer-wrapper, that
calls authentication methods.
`ProtoDialer` is created to check the `ProtocolInfo`
in the created connection.

Part of #301
  • Loading branch information
DerekBum committed Jan 31, 2024
1 parent 6ba01ff commit 1a49b28
Show file tree
Hide file tree
Showing 6 changed files with 441 additions and 101 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ Versioning](http://semver.org/spec/v2.0.0.html) except to the first release.
the response (#237)
- Ability to mock connections for tests (#237). Added new types `MockDoer`,
`MockRequest` to `test_helpers`.
- `AuthDialer` and `ProtocolDialer` types for creating a dialer with
authentication and `ProtocolInfo` check (#301)

### Changed

Expand Down
4 changes: 3 additions & 1 deletion connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,9 @@ func (conn *Connection) dial(ctx context.Context) error {
}

conn.addr = c.Addr()
conn.Greeting.Version = c.Greeting().Version
connGreeting := c.Greeting()
conn.Greeting.Version = connGreeting.Version
conn.Greeting.Salt = connGreeting.Salt
conn.serverProtocolInfo = c.ProtocolInfo()

spaceAndIndexNamesSupported :=
Expand Down
Loading

0 comments on commit 1a49b28

Please sign in to comment.