refactor: set app version when enabling remote tls issue reporting

This commit is contained in:
James Houlahan
2020-04-24 16:00:12 +02:00
committed by Michal Horejsek
parent 0fd5ca3a24
commit e9735c6110
4 changed files with 11 additions and 11 deletions

View File

@ -44,11 +44,11 @@ func (c *Config) GetRoundTripper(cm *pmapi.ClientManager, listener listener.List
basicDialer := pmapi.NewBasicTLSDialer()
// We wrap the TLS dialer in a layer which enforces connections to trusted servers.
pinningDialer := pmapi.NewPinningTLSDialer(basicDialer, c.GetAPIConfig().AppVersion)
pinningDialer := pmapi.NewPinningTLSDialer(basicDialer)
// We want any pin mismatches to be communicated back to bridge GUI and reported.
pinningDialer.SetTLSIssueNotifier(func() { listener.Emit(events.TLSCertIssue, "") })
pinningDialer.SetRemoteTLSIssueReporting(true)
pinningDialer.EnableRemoteTLSIssueReporting(c.GetAPIConfig().AppVersion)
// We wrap the pinning dialer in a layer which adds "alternative routing" feature.
proxyDialer := pmapi.NewProxyTLSDialer(pinningDialer, cm)