mirror of https://github.com/grpc/grpc-dart.git
Use host without port as authority when making secure connection (#238)
This commit is contained in:
parent
8e23f00f41
commit
20352dd718
|
|
@ -1,3 +1,8 @@
|
||||||
|
## 2.1.2
|
||||||
|
|
||||||
|
* Fix bug introduced in 2.1.1 where the port would be added to the default authority when making a
|
||||||
|
secure connection.
|
||||||
|
|
||||||
## 2.1.1
|
## 2.1.1
|
||||||
|
|
||||||
* Fix bug introduced in 2.1.0 where an explicit `authority` would not be used when making a secure
|
* Fix bug introduced in 2.1.0 where an explicit `authority` would not be used when making a secure
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,11 @@ class Http2ClientConnection implements connection.ClientConnection {
|
||||||
if (securityContext != null) {
|
if (securityContext != null) {
|
||||||
// Todo(sigurdm): We want to pass supportedProtocols: ['h2']. http://dartbug.com/37950
|
// Todo(sigurdm): We want to pass supportedProtocols: ['h2']. http://dartbug.com/37950
|
||||||
socket = await SecureSocket.secure(socket,
|
socket = await SecureSocket.secure(socket,
|
||||||
host: authority,
|
// This is not really the host, but the authority to verify the TLC
|
||||||
|
// connection against.
|
||||||
|
//
|
||||||
|
// We don't use `this.authority` here, as that includes the port.
|
||||||
|
host: options.credentials.authority ?? host,
|
||||||
context: securityContext,
|
context: securityContext,
|
||||||
onBadCertificate: _validateBadCertificate);
|
onBadCertificate: _validateBadCertificate);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
name: grpc
|
name: grpc
|
||||||
description: Dart implementation of gRPC, a high performance, open-source universal RPC framework.
|
description: Dart implementation of gRPC, a high performance, open-source universal RPC framework.
|
||||||
|
|
||||||
version: 2.1.1
|
version: 2.1.2
|
||||||
|
|
||||||
author: Dart Team <misc@dartlang.org>
|
author: Dart Team <misc@dartlang.org>
|
||||||
homepage: https://github.com/dart-lang/grpc-dart
|
homepage: https://github.com/dart-lang/grpc-dart
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue