adaojunior / pusher

The Dart library for interacting with the Pusher HTTP API.
https://pub.dartlang.org/packages/pusher
MIT License
12 stars 13 forks source link

handshake error when connecting to https, works fine with http #28

Closed LtotheWT closed 4 years ago

LtotheWT commented 4 years ago

HandshakeException: Handshake error in client (OS Error: CERTIFICATE_VERIFY_FAILED: ok(handshake.cc:354))

is there any configuration that I need to do on client side ?

can we have a badCertificateCallback like in HttpClient ?

static HttpClient client = new HttpClient() ..badCertificateCallback = (_certificateCheck);

static bool _certificateCheck(X509Certificate cert, String host, int port) => host == 'local.domain.ext';

adaojunior commented 4 years ago

Hi @LtotheWT, this library was built to be used on the server side. It does not work on Browsers or Flutter. You will find alternatives to it on https://pub.dev.

LtotheWT commented 4 years ago

i added badCertificateCallback and its working now, thanks for the repo mate