Where is the devastating change?

I wrote a CRUD application to interact with JIRA. I ended up updating my haskell environment because cabal-dev doesn't solve everything. As a result, I have a breakdown, with this error at any time I try to use any code that interacts with JIRA.

Spike: HandshakeFailed (Error_Misc "user error (unexpected type received. expecting handshake and got: Alert [(AlertLevel_Warning,UnrecognizedName)])") 

After a little google search, I think this is either tls related or the http channel that uses tls.

I am currently using tls-1.1.2 and http-conduit-1.8.7.1 previously I used tls-0.9.11 and http-conduit >= 1.5 && < 1.7 (not sure if the old installation was gone.

This is where I find a break taking place.

 manSettings :: ManagerSettings manSettings = def { managerCheckCerts = \ _ _ _-> return CertificateUsageAccept } 

this is how he looked like

 manSettings :: ManagerSettings manSettings = def { managerCheckCerts = \ _ _ -> return CertificateUsageAccept } 

Here is the code that uses it

 initialRequest :: forall (m :: * -> *). URI -> IO (Request m,Manager) initialRequest uri = do initReq <- parseUrl uri -- let the server tell you what the request header -- should look like manager <- newManager manSettings -- a Manager manages http connections -- we mod the settings to handle -- the SSL cert. See manSettings below. return (modReq initReq,manager) where modReq initReq = applyBasicAuth username password initReq 

Let me know if I left something. At the moment, I'm not sure what happened between now and now.

+6
source share
1 answer

This is a good assumption about the source of the error, but very unlikely: managerCheckCerts simply uses the certificate package to validate the certificates. The error message that you see seems to be coming from tls itself and indicates a data transfer failure. It would probably be nice to write an error report using tls, preferably first, narrowing the problem down to one HTTPS call that fails (or even better, using only tls and showing the same failure).

+4
source

All Articles