-
Notifications
You must be signed in to change notification settings - Fork 25
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
For TLS connections, how can I set TLSSettings? #8
Comments
Hmm... I was wondering how this might work, but haven't needed it myself. It's definitely something I need to consider. I may need to abstract TLS settings in such a way I can supply TLS settings for both In the meantime, I did expose the lower-level conduit mechanism. -- | Set up and run a client connected via TLS.
runClientTLS :: MQTTConfig -> IO MQTTClient
runClientTLS cfg@MQTTConfig{..} = tcpCompat (runTLSClient (tlsClientConfig _port (BCS.pack _hostname))) cfg
-- Compatibility mechanisms for TCP Conduit bits.
tcpCompat :: ((AppData -> IO ()) -> IO ()) -> MQTTConfig -> IO MQTTClient
tcpCompat mkconn = runMQTTConduit (adapt mkconn)
where adapt mk f = mk (f . adaptor)
adaptor ad = (appSource ad, appSink ad) |
I filed snoyberg/conduit/issues/423 for this. I don't see how I'd actually supply this to the underlying conduit TLS connector. |
I figured you could use the |
I added Let me know how this works! |
Can confirm this works as expected. Thanks! |
For those, inexperienced like me, you need to populate |
e.g. for setting custom CA certificates to use.
From what I can tell, this library uses
tlsClientConfig
, which only uses theTLSSettings
default value.The text was updated successfully, but these errors were encountered: