dart-lang/pub-dev

Handshake Error - Connection Verify Failed

Closed this issue · 4 comments

URL: https://pub.dartlang.org/flutter

When using Flutter Doctor command, I am getting the error (Look at the screenshot.). When I changed the Environment variables to

PUB_HOSTED_URL=https://pub.flutter-io.cn
FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn

then the 'pub' command is working fine and I am able to install flutter correctly.

I am in India, from last 2-3 Weeks this issue persists, and I am not able to install pub packages from default server.

Error: When using default server settings.

flutterdoctor

Success: When Using China Mirror

flutternewdoctor

Do you have a proxy or something in the way that might serve a self-signed certificate for pub.dartlang.org? Can you access https://pub.dartlang.org/ in a browser without warnings?

Could you post the output of running

openssl s_client -showcerts -servername pub.dartlang.org -connect pub.dartlang.org:443

?

No, I do not have any proxy setup. Yes, I can access https://pub.dartlang.org/ without any warnings. I am attaching the screenshot of that.

image

OpenSSL Command Screenshots

image

image

For some reason, the trust store that both openssl and pub use doesn't have the GeoTrust Global CA in it, so they think it's a self-signed certificate. Chrome is happy with the certificate, so it must be using a different store.

The certificate chain is *.dartlang.org -> Google Internet Authority G2 -> GeoTrust Global CA.

So, something's gone wrong with the CA trust store on your machine, AFAICT. This doesn't look like an issue with the pub site itself, so I'm moving this bug over to the Dart SDK to see if they have a better idea of what might be wrong.

This issue was moved to dart-lang/sdk#32131