Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package xmpp-dns for openSUSE:Factory 
checked in at 2025-09-09 20:29:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xmpp-dns (Old)
 and      /work/SRC/openSUSE:Factory/.xmpp-dns.new.1977 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xmpp-dns"

Tue Sep  9 20:29:08 2025 rev:17 rq:1303132 version:0.5.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/xmpp-dns/xmpp-dns.changes        2025-08-13 
18:16:04.988871570 +0200
+++ /work/SRC/openSUSE:Factory/.xmpp-dns.new.1977/xmpp-dns.changes      
2025-09-09 20:29:19.554902118 +0200
@@ -1,0 +2,7 @@
+Mon Sep  8 06:57:01 UTC 2025 - Michael Vetter <[email protected]>
+
+- Update to 0.5.2:
+  Added:
+  * Print TLS version after successful connection.
+
+-------------------------------------------------------------------

Old:
----
  xmpp-dns-0.5.1.tar.gz

New:
----
  xmpp-dns-0.5.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xmpp-dns.spec ++++++
--- /var/tmp/diff_new_pack.wjNpe6/_old  2025-09-09 20:29:20.346935496 +0200
+++ /var/tmp/diff_new_pack.wjNpe6/_new  2025-09-09 20:29:20.346935496 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           xmpp-dns
-Version:        0.5.1
+Version:        0.5.2
 Release:        0
 Summary:        A CLI tool to check XMPP SRV records
 License:        BSD-2-Clause

++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.wjNpe6/_old  2025-09-09 20:29:20.382937013 +0200
+++ /var/tmp/diff_new_pack.wjNpe6/_new  2025-09-09 20:29:20.382937013 +0200
@@ -1,6 +1,6 @@
-mtime: 1755086698
-commit: bed23ded4f4c69035d80d0503ca3b560bee073209e83592f3515a178ac6e9fa6
+mtime: 1757315063
+commit: 806321e5fb35d38adb509b01f0994c0534d2eabf78e337bee3d2cb7723ddf279
 url: https://src.opensuse.org/xmpp/xmpp-dns.git
-revision: bed23ded4f4c69035d80d0503ca3b560bee073209e83592f3515a178ac6e9fa6
+revision: 806321e5fb35d38adb509b01f0994c0534d2eabf78e337bee3d2cb7723ddf279
 projectscmsync: https://src.opensuse.org/xmpp/_ObsPrj.git
 

++++++ _service ++++++
--- /var/tmp/diff_new_pack.wjNpe6/_old  2025-09-09 20:29:20.406938024 +0200
+++ /var/tmp/diff_new_pack.wjNpe6/_new  2025-09-09 20:29:20.414938361 +0200
@@ -3,7 +3,7 @@
     <param name="url">https://salsa.debian.org/mdosch/xmpp-dns.git</param>
     <param name="scm">git</param>
     <param name="exclude">.git</param>
-    <param name="revision">v0.5.1</param>
+    <param name="revision">v0.5.2</param>
     <param name="versionformat">@PARENT_TAG@</param>
     <param name="changesgenerate">disable</param>
     <param name="versionrewrite-pattern">v(.*)</param>

++++++ build.specials.obscpio ++++++

++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore      1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore      2025-09-08 09:04:46.000000000 +0200
@@ -0,0 +1 @@
+.osc

++++++ vendor.tar.gz ++++++
++++ 5091 lines of diff (skipped)

++++++ xmpp-dns-0.5.1.tar.gz -> xmpp-dns-0.5.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmpp-dns-0.5.1/CHANGELOG.md 
new/xmpp-dns-0.5.2/CHANGELOG.md
--- old/xmpp-dns-0.5.1/CHANGELOG.md     2025-08-13 13:17:59.000000000 +0200
+++ new/xmpp-dns-0.5.2/CHANGELOG.md     2025-09-04 22:44:07.000000000 +0200
@@ -1,5 +1,9 @@
 # Changelog
 
+## [0.5.2] 2025-09-04
+### Added
+- Print TLS version after successful connection.
+
 ## [0.5.1] 2025-08-13
 ### Changed
 - No changes to v0.5.0, only created a new tag due to CI issues.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmpp-dns-0.5.1/go.mod new/xmpp-dns-0.5.2/go.mod
--- old/xmpp-dns-0.5.1/go.mod   2025-08-13 13:17:59.000000000 +0200
+++ new/xmpp-dns-0.5.2/go.mod   2025-09-04 22:44:07.000000000 +0200
@@ -5,6 +5,7 @@
 toolchain go1.24.0
 
 require (
+       github.com/gorilla/websocket v1.5.3
        github.com/pborman/getopt/v2 v2.1.0
        golang.org/x/net v0.43.0
        salsa.debian.org/mdosch/xmppsrv v0.3.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmpp-dns-0.5.1/go.sum new/xmpp-dns-0.5.2/go.sum
--- old/xmpp-dns-0.5.1/go.sum   2025-08-13 13:17:59.000000000 +0200
+++ new/xmpp-dns-0.5.2/go.sum   2025-09-04 22:44:07.000000000 +0200
@@ -1,3 +1,5 @@
+github.com/gorilla/websocket v1.5.3 
h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
+github.com/gorilla/websocket v1.5.3/go.mod 
h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
 github.com/pborman/getopt/v2 v2.1.0 
h1:eNfR+r+dWLdWmV8g5OlpyrTYHkhVNxHBdN2cCrJmOEA=
 github.com/pborman/getopt/v2 v2.1.0/go.mod 
h1:4NtW75ny4eBw9fO1bhtNdYTlZKYX5/tBLtsOpwKIKd0=
 golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE=
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmpp-dns-0.5.1/main.go new/xmpp-dns-0.5.2/main.go
--- old/xmpp-dns-0.5.1/main.go  2025-08-13 13:17:59.000000000 +0200
+++ new/xmpp-dns-0.5.2/main.go  2025-09-04 22:44:07.000000000 +0200
@@ -23,14 +23,14 @@
        "strings"
        "time"
 
+       "github.com/gorilla/websocket"    // BSD-2-Clause
        "github.com/pborman/getopt/v2"    // BSD-3-Clause
        "golang.org/x/net/idna"           // BSD-3-Clause
-       "golang.org/x/net/websocket"      // BSD-3-Clause
        "salsa.debian.org/mdosch/xmppsrv" // BSD-2-Clause
 )
 
 const (
-       version             = "0.5.1"
+       version             = "0.5.2"
        nsBOSH              = "urn:xmpp:alt-connections:xbosh"
        nsC2SdTLS           = "urn:xmpp:alt-connections:tls"
        nsC2SQuic           = "urn:xmpp:alt-connections:quic"
@@ -70,7 +70,11 @@
        // statusOK will print [OK] in green color.
        statusOK = "Test: [\033[32mOK\033[00m]"
        // statusNOK will print [Not OK] in red color.
-       statusNOK = "Test: [\033[31mNot OK\033[00m]"
+       statusNOK   = "Test: [\033[31mNot OK\033[00m]"
+       colorGreen  = "\033[32m"
+       colorRed    = "\033[31m"
+       colorYellow = "\033[33m"
+       colorReset  = "\033[00m"
 )
 
 func main() {
@@ -115,6 +119,10 @@
        if *flagNoColor || runtime.GOOS == "windows" {
                statusOK = "Test: [OK]"
                statusNOK = "Test: [Not OK]"
+               colorGreen = ""
+               colorRed = ""
+               colorYellow = ""
+               colorReset = ""
        }
 
        // If connection test is required we'll also show IPs.
@@ -909,7 +917,8 @@
                        boshOpen.From, server)
                return
        }
-       fmt.Println(statusOK)
+       fmt.Print(statusOK)
+       printTLSVersion(resp.TLS.Version)
 }
 
 func checkWebSocket(server string, target string, tlsConfig *tls.Config, 
timeout time.Duration, targetType string) {
@@ -924,6 +933,7 @@
        }
        var wsOpen wsOpenXML
        var framing, from string
+       var dialer websocket.Dialer
        switch targetType {
        case "c2s":
                framing = nsXMPPFraming
@@ -943,6 +953,8 @@
                fmt.Println(err)
                return
        }
+       headers := http.Header{}
+       headers.Add("Origin", origURI.String())
        wsTLSConfig := &tls.Config{
                MinVersion:         tlsConfig.MinVersion,
                ServerName:         wsURI.Hostname(),
@@ -956,30 +968,24 @@
        // https://github.com/gorilla/websocket/issues/417
        // wsTLSConfig.NextProtos = []string{"http/1.1", "h2"}
        wsTLSConfig.NextProtos = []string{"http/1.1"}
-       wsConfig := &websocket.Config{
-               Location:  wsURI,
-               Origin:    origURI,
-               Version:   13,
-               TlsConfig: wsTLSConfig,
-       }
-       wsConfig.Protocol = append(wsConfig.Protocol, "xmpp")
+       dialer.TLSClientConfig = wsTLSConfig
+       dialer.Subprotocols = append(dialer.Subprotocols, "xmpp")
        ctx, cancel := context.WithTimeout(context.Background(), timeout)
        defer cancel()
-       wsConn, err := wsConfig.DialContext(ctx)
+       wsConn, resp, err := dialer.DialContext(ctx, wsURI.String(), headers)
        if err != nil {
                fmt.Println(statusNOK)
                fmt.Println(err)
                return
        }
-       _, err = wsConn.Write([]byte(fmt.Sprintf(
+       err = wsConn.WriteMessage(websocket.TextMessage, []byte(fmt.Sprintf(
                `<open xmlns='%s' to='%s'%s version='1.0' />`, framing, server, 
from)))
        if err != nil {
                fmt.Println(statusNOK)
                fmt.Println(err)
                return
        }
-       buf := make([]byte, 4096)
-       _, err = wsConn.Read(buf)
+       _, buf, err := wsConn.ReadMessage()
        if err != nil {
                fmt.Println(statusNOK)
                fmt.Println(err)
@@ -997,13 +1003,18 @@
                fmt.Printf("Server identifies as %s instead of %s.\n",
                        wsOpen.From, server)
                return
-       } else if !wsConn.IsClientConn() {
-               _ = wsConn.Close()
-               fmt.Println(statusNOK)
-               fmt.Println("WS connection is no client connection.")
-               return
        }
-       fmt.Println(statusOK)
+       fmt.Print(statusOK)
+       if resp.TLS != nil {
+               printTLSVersion(resp.TLS.Version)
+       } else {
+               state := getTLS(wsConn)
+               if state != nil {
+                       printTLSVersion(state.Version)
+               } else {
+                       fmt.Println()
+               }
+       }
        err = wsConn.Close()
        if err != nil {
                fmt.Println(err)
@@ -1066,10 +1077,22 @@
        start := c.ConnectionState().PeerCertificates[0].NotBefore
        now := time.Now()
        if now.Before(expiry) && now.After(start) {
-               fmt.Println(statusOK)
+               fmt.Print(statusOK)
        } else {
-               fmt.Println(statusNOK)
-               fmt.Println("Valid from", start, "to", expiry)
+               fmt.Print(statusNOK)
+               fmt.Print("Valid from", start, "to", expiry)
+       }
+       printTLSVersion(c.ConnectionState().Version)
+}
+
+func printTLSVersion(tv uint16) {
+       switch tv {
+       case tls.VersionTLS13:
+               fmt.Printf(" (%s%s%s)\n", colorGreen, tls.VersionName(tv), 
colorReset)
+       case tls.VersionTLS12:
+               fmt.Printf(" (%s%s%s)\n", colorYellow, tls.VersionName(tv), 
colorReset)
+       default:
+               fmt.Printf(" (%s%s%s)\n", colorRed, tls.VersionName(tv), 
colorReset)
        }
 }
 
@@ -1105,3 +1128,18 @@
        }
        return string(id)
 }
+
+func getTLS(c any) *tls.ConnectionState {
+       for c != nil {
+               if tc, ok := c.(*tls.Conn); ok {
+                       state := tc.ConnectionState()
+                       return &state
+               }
+               wc, ok := c.(interface{ NetConn() net.Conn })
+               if !ok {
+                       break
+               }
+               c = wc.NetConn()
+       }
+       return nil
+}

Reply via email to