Skip to content

Commit 0f7d508

Browse files
committed
api: create AuthDialer and ProtocolDialer
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
1 parent 6ba01ff commit 0f7d508

File tree

5 files changed

+404
-73
lines changed

5 files changed

+404
-73
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ Versioning](http://semver.org/spec/v2.0.0.html) except to the first release.
3737
the response (#237)
3838
- Ability to mock connections for tests (#237). Added new types `MockDoer`,
3939
`MockRequest` to `test_helpers`.
40+
- `AuthDialer` and `ProtocolDialer` types for creating a dialer with
41+
authentication and `ProtocolInfo` check (#301)
4042

4143
### Changed
4244

connection.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,9 @@ func (conn *Connection) dial(ctx context.Context) error {
440440
}
441441

442442
conn.addr = c.Addr()
443-
conn.Greeting.Version = c.Greeting().Version
443+
connGreeting := c.Greeting()
444+
conn.Greeting.Version = connGreeting.Version
445+
conn.Greeting.Salt = connGreeting.Salt
444446
conn.serverProtocolInfo = c.ProtocolInfo()
445447

446448
spaceAndIndexNamesSupported :=

0 commit comments

Comments
 (0)