Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Set TrustedAddress in xmpp.Config

In the case that the server's hostname is configured explicitly, it's
reasonable to tell xmpp to trust certificates issued to that hostname.
  • Loading branch information...
commit 5475945f41d478085f5d992ae8c590d1f367dea1 1 parent 5e3af81
Adam Langley authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 ui.go
View
8 ui.go
@@ -172,8 +172,11 @@ func main() {
domain := parts[1]
var addr string
+ addrTrusted := false
+
if len(config.Server) > 0 && config.Port > 0 {
addr = fmt.Sprintf("%s:%d", config.Server, config.Port)
+ addrTrusted = true
} else {
if len(config.Proxies) > 0 {
alert(term, "Cannot connect via a proxy without Server and Port being set in the config file as an SRV lookup would leak information.")
@@ -204,8 +207,9 @@ func main() {
}
xmppConfig := &xmpp.Config{
- Log: &lineLogger{term, nil},
- Create: *createAccount,
+ Log: &lineLogger{term, nil},
+ Create: *createAccount,
+ TrustedAddress: addrTrusted,
}
if len(config.RawLogFile) > 0 {
Please sign in to comment.
Something went wrong with that request. Please try again.