grpc / grpc-dart

The Dart language implementation of gRPC.
https://pub.dev/packages/grpc
Apache License 2.0
861 stars 271 forks source link

validateBadCertificate didn't work for me? #481

Open ChokWah opened 3 years ago

ChokWah commented 3 years ago

In dart - grpc-3.0.0

when: _socket = await SecureSocket.secure(_socket, // 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, onBadCertificate: _validateBadCertificate); I change the code : bool _validateBadCertificate(X509Certificate certificate) { return true; }

Then, no response, no error, I don't what happen.

I want ingore ssl to connect a https. In chrome, use thisisunsafe to ingore. In iPhone, AndroidPhone, it was no response.