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

TlsException Unknown CA OSX #438

Closed
asamiam opened this issue Jun 27, 2015 · 12 comments
Closed

TlsException Unknown CA OSX #438

asamiam opened this issue Jun 27, 2015 · 12 comments

Comments

@asamiam
Copy link

asamiam commented Jun 27, 2015

I'm still getting this error on OSX (works fine on Windows). It handles stackage.org fine (0.1.0.0 didn't, but upgrading to 0.1.1.0 fixed that), but now it dies on GHC:

Preparing to download ghc-7.8.4 ...TlsException (HandshakeFailed (Error_Protocol ("certificate has unknown CA",True,UnknownCa)))
@snoyberg
Copy link
Contributor

@manny-fp As our resident Mac tester, any thoughts?

@snoyberg
Copy link
Contributor

And @aceLren Could you run the debugging instructions from https://github.com/vincenthz/hs-tls#common-issues against www.haskell.org?

@vincenthz
Copy link
Contributor

This is an issue with what's trusted in the system certificates once again. My osx machine has the right certificates in the keychains, not sure which process is updating it on osx. Is this a brand new osx installation ? or a really old one ?

@snoyberg snoyberg added this to the 0.2.0.0 milestone Jun 27, 2015
@asamiam
Copy link
Author

asamiam commented Jun 27, 2015

This is a new installation but I think it has to do with my corporate proxy. It's working fine right now (I'm at home) so I can't reproduce it, but I'll try on Monday. Thanks for being so responsive - Stack is really awesome!

@vincenthz
Copy link
Contributor

That sounds like one of those tls proxy that do certificates MITM with a company's root certificate installed on company machines. You could use tls-retrievecertificate to see if that's the case; You should see something different on the chain when you're in the corporate network (vs home).

@asamiam
Copy link
Author

asamiam commented Jun 27, 2015

Got it, yes that sounds right.

@borsboom
Copy link
Contributor

I'm unclear about where hs-tls looks for its root CA certificates on OS X, but in theory if you put the MITM certificate wherever that is, it should work.

@snoyberg
Copy link
Contributor

snoyberg commented Jul 2, 2015

@aceLren Any success with this?

@asamiam
Copy link
Author

asamiam commented Jul 2, 2015

I ran tls-retrievecertificate (after building with a previous cabal / ghc installation) but it resulted in:

tls-retrievecertificate: HandshakeFailed (Error_Packet_Parsing "Failed reading: invalid header type: 72\nFrom:\theader\n\n")

I've tried a couple other things but haven't been able to get the certificate to work; still getting the same error.

Btw what changed between 0.1.0.0 and 0.1.1.0? It fixed this issue for Stackage, maybe the same thing would fix it for GHC?

@snoyberg
Copy link
Contributor

snoyberg commented Jul 2, 2015

The change on stackage.org is that we stopped using stackage.org completely. Instead, all files are downloaded from S3.

This error report looks like it might need to get moved to the hs-tls issue tracker, I'm not sure how much else we can do here.

@snoyberg
Copy link
Contributor

snoyberg commented Jul 7, 2015

Closing, if the issue still exists please reopen.

@snoyberg snoyberg closed this as completed Jul 7, 2015
@ssgreg
Copy link

ssgreg commented May 31, 2016

Hi guys. The same problem. Trying to connect to (gateway.sandbox.push.apple.com:2195):
HandshakeFailed (Error_Protocol ("certificate has unknown CA",True,UnknownCa))

tls-retrievecertificate gateway.sandbox.push.apple.com 2195 --chain --verify
returns
connecting to gateway.sandbox.push.apple.com on port 2195 ... tls-retrievecertificate: HandshakeFailed (Error_Packet_unexpected "Alert [(AlertLevel_Fatal,HandshakeFailure)]" " expected: change cipher")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants