Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pub https proxy error #20270

Closed
DartBot opened this issue Jul 30, 2014 · 7 comments
Closed

Pub https proxy error #20270

DartBot opened this issue Jul 30, 2014 · 7 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-duplicate Closed in favor of an existing report library-io

Comments

@DartBot
Copy link

DartBot commented Jul 30, 2014

This issue was originally filed by [email protected]


What steps will reproduce the problem?

  1. Set HTTPS_PROXY as env variable with authentication.
  2. Either run pub --trace "get"
  3. Or run it from dart editor. Tools -> Pub Get

What is the expected output? What do you see instead?
Pub should fetch resources but instead gives following message

Resolving dependencies... (0.1s)
Handshake error in client (OS Error: Peer's Certificate issuer is not recognized
., errno = -8179)
dart:isolate _RawReceivePortImpl._handleMessage

---- Log transcript ----
FINE: Pub 1.5.3
IO : Spawning "cmd /c ver" in C:\Users\338466\dart\sunflower.
IO : Finished ver. Exit code 0.
    | stdout:
    | |
    | | Microsoft Windows [Version 6.1.7601]
    | Nothing output on stderr.
SLVR: Solving dependencies:
    | - browser >=0.9.0 <0.10.0 from hosted (browser)
IO : Get versions from https://pub.dartlang.org/api/packages/browser.
FINE: HTTP GET https://pub.dartlang.org/api/packages/browser
    | Accept: application/vnd.pub.v2+json
    | user-agent: Dart pub 1.5.3
ERR : Handshake error in client (OS Error: Peer's Certificate issuer is not reco
gnized., errno = -8179)
FINE: Exception type: HandshakeException
ERR : dart:isolate _RawReceivePortImpl._handleMessage

---- End log transcript ----

What version of the product are you using?
Dart pub 1.5.3

On what operating system?
Microsoft Windows [Version 6.1.7601](Windows 7)

What browser (if applicable)?
None

Please provide any additional information below.
I am trying to use dart editor behind https proxy at my workplace, but it keeps giving this error. I cannot use http proxy since the package manager uses HTTPS links. So I cannot install any packages. There is another bug https://code.google.com/p/dart/issues/detail?id=15611 which looks similar but is marked fixed. It says fix should be in next stable release of dart and I use latest stable v1.5.3 .

@iposva-google
Copy link
Contributor

Added Area-Pub, Triaged labels.

@nex3
Copy link
Member

nex3 commented Jul 30, 2014

I'm moving this to dart:io, since it handles all SSL- and proxy-related infrastructure.

Does your local SSL certificate store have a certificate for the HTTPS proxy you're using?


Removed Area-Pub label.
Added Area-Library, Library-IO labels.

@andersjohnsen
Copy link

Hi,

Can you try to run the script from here: https://code.google.com/p/dart/issues/detail?id=17664#c13

That should help us identify what the issue may be.

Thanks!


Added NeedsInfo label.

@DartBot
Copy link
Author

DartBot commented Jul 31, 2014

This comment was originally written by [email protected]


@NweiZ I can browse internet with https proxy. So browser must be using a certificate. Are you are looking for the following output.

@ajohnsen Hi this is the output of the script given in comment #­13, removing the organization and personal details

Bad certificate connecting to pub.dartlang.org:443:
CN=XXXXXXX,OU=XXXXXXX,O=XXX,
L=Chennai,ST=Tamilnadu,C=IN,E=XXX
CN=pub.dartlang.org,OU=XXXXXXX,O=XXX,L=Chennai,ST=T
amilnadu,C=IN,E=XXX
2014-07-29 13:00:00.000
2015-07-30 13:00:00.000

Response certificate:
CN=XXXXXXX,OU=XXXXXXX,O=XXX,
L=Chennai,ST=Tamilnadu,C=IN,E=XXX
CN=pub.dartlang.org,OU=XXXXXXX,O=XXX,L=Chennai,ST=T
amilnadu,C=IN,E=XXX
2014-07-29 13:00:00.000
2015-07-30 13:00:00.000

@andersjohnsen
Copy link

Yes, this is a problem with the proxy certificate. Take a look here: https://code.google.com/p/dart/issues/detail?id=18929#c7

Basically, the certificate is not in the built-in set of root certificates.


cc @sgjesse.

@DartBot
Copy link
Author

DartBot commented Aug 1, 2014

This comment was originally written by [email protected]


@ajohnsen Hi, the thread says it is not yet planned how to add/use other certificates than the built-in ones. It only shows how to get the cert. Its not clear where that stands. Will pub reject external certs outright or is there a possibility of adding new ones.

HTTPS proxies can have their own certs. If it is unacceptable to pub, perhaps a more broader set of certs should be added. Also comment #­10 on the thread you refer is confusing. Yes OS should be managing certs but as you said pub has a built-in set of certs and it does not honor certs provided by OS.

@sgjesse
Copy link
Contributor

sgjesse commented Aug 12, 2014

Added Duplicate label.
Marked as being merged into #18929.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-duplicate Closed in favor of an existing report library-io
Projects
None yet
Development

No branches or pull requests

6 participants