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

Don't call certificate-related functions when not checking certificates #128

Open
VichoReyes opened this issue Sep 22, 2018 · 2 comments
Open

Comments

@VichoReyes
Copy link

I want to make an app that calls an api in http://localhost/, so it doesn't make too much sense to use certificates.
So, because of this bug in hs-certificate I decided to disable them following the instructions mentioned in issue #102, but the program still spends most of its time on functions from Data.X509.CertificateStore, acording to the profiling report.

So, maybe the library could realize I'm not using https and just avoid calling those functions?

@ondrap
Copy link
Collaborator

ondrap commented Nov 16, 2018

Do you have more information about this? Like from where in particular it gets called?

@VichoReyes
Copy link
Author

Got the following stack trace by sending SIGINT:

*** Exception (reporting due to +RTS -xc): (THUNK_STATIC), stack trace: 
  Data.X509.CertificateStore.readCertificates,
  called from Data.X509.CertificateStore.readCertificateStore.makeDirStore,
  called from Data.X509.CertificateStore.readCertificateStore,
  called from System.X509.Unix.getSystemCertificateStore,
  called from Network.Connection.initConnectionContext,
  called from Network.HTTP.Client.TLS.getTlsConnection,
  called from Network.HTTP.Client.TLS.mkManagerSettingsContext',
  called from Network.HTTP.Client.TLS.mkManagerSettingsContext,
  called from Network.HTTP.Client.TLS.mkManagerSettings,
  called from Network.HTTP.Client.TLS.tlsManagerSettings,
  called from Network.HTTP.Client.Types.managerTlsConnection,
  called from Network.HTTP.Client.Manager.mkCreateConnection,
  called from Network.HTTP.Client.Manager.newManager,
  called from Network.Wreq.Session.newSessionControl,
  called from Network.Wreq.Session.newAPISession,

But I pretty much abandoned the side project I had that had this problem, so close this if you want to.

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

No branches or pull requests

2 participants