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 2022-10-08 01:25:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xmpp-dns (Old)
 and      /work/SRC/openSUSE:Factory/.xmpp-dns.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xmpp-dns"

Sat Oct  8 01:25:49 2022 rev:3 rq:1008680 version:0.3.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/xmpp-dns/xmpp-dns.changes        2022-08-22 
12:02:03.945360734 +0200
+++ /work/SRC/openSUSE:Factory/.xmpp-dns.new.2275/xmpp-dns.changes      
2022-10-08 01:26:18.598378962 +0200
@@ -1,0 +2,6 @@
+Fri Oct  7 07:29:00 UTC 2022 - Michael Vetter <mvet...@suse.com>
+
+- Update to 0.3.2:
+  * Fix detection of XMPP support when using direct TLS and ALPN.
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ xmpp-dns.spec ++++++
--- /var/tmp/diff_new_pack.1rH2el/_old  2022-10-08 01:26:19.738381577 +0200
+++ /var/tmp/diff_new_pack.1rH2el/_new  2022-10-08 01:26:19.742381586 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           xmpp-dns
-Version:        0.3.1
+Version:        0.3.2
 Release:        0
 Summary:        A CLI tool to check XMPP SRV records
 License:        BSD-2-Clause

++++++ _service ++++++
--- /var/tmp/diff_new_pack.1rH2el/_old  2022-10-08 01:26:19.770381650 +0200
+++ /var/tmp/diff_new_pack.1rH2el/_new  2022-10-08 01:26:19.774381659 +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.3.1</param>
+    <param name="revision">v0.3.2</param>
     <param name="versionformat">@PARENT_TAG@</param>
     <param name="changesgenerate">disable</param>
     <param name="versionrewrite-pattern">v(.*)</param>

++++++ vendor.tar.gz ++++++

++++++ xmpp-dns-0.3.1.tar.gz -> xmpp-dns-0.3.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmpp-dns-0.3.1/CHANGELOG.md 
new/xmpp-dns-0.3.2/CHANGELOG.md
--- old/xmpp-dns-0.3.1/CHANGELOG.md     2022-08-21 12:45:40.000000000 +0200
+++ new/xmpp-dns-0.3.2/CHANGELOG.md     2022-10-06 12:43:07.000000000 +0200
@@ -1,5 +1,9 @@
 # Changelog
 
+## [0.3.2]
+### Changed
+- Fix detection of XMPP support when using direct TLS and ALPN.
+
 ## [0.3.1]
 ### Changed
 - Print error details if SRV lookup fails.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmpp-dns-0.3.1/main.go new/xmpp-dns-0.3.2/main.go
--- old/xmpp-dns-0.3.1/main.go  2022-08-21 12:45:40.000000000 +0200
+++ new/xmpp-dns-0.3.2/main.go  2022-10-06 12:43:07.000000000 +0200
@@ -12,6 +12,7 @@
        "net"
        "os"
        "runtime"
+       "strings"
        "time"
 
        "github.com/pborman/getopt/v2"    // BSD-3-Clause
@@ -19,7 +20,7 @@
 )
 
 const (
-       version = "0.3.1"
+       version = "0.3.2"
 )
 
 var (
@@ -250,16 +251,16 @@
                                                startTLS("client", c, tlsConfig)
                                                c.Close()
                                        case "xmpps-client":
-                                               c.Close()
                                                tlsConfig.NextProtos = 
[]string{"xmpp-client"}
-                                               directTLS(server, transport, 
tlsConfig)
+                                               directTLS("server", c, 
tlsConfig)
+                                               c.Close()
                                        case "xmpp-server":
                                                startTLS("server", c, tlsConfig)
                                                c.Close()
                                        case "xmpps-server":
-                                               c.Close()
                                                tlsConfig.NextProtos = 
[]string{"xmpp-server"}
-                                               directTLS(server, transport, 
tlsConfig)
+                                               directTLS("server", c, 
tlsConfig)
+                                               c.Close()
                                        default:
                                                c.Close()
                                        }
@@ -287,6 +288,7 @@
                Text    string   `xml:",chardata"`
                Xmlns   string   `xml:"xmlns,attr"`
        }
+       // Created with https://github.com/miku/zek
        type Failure struct {
                XMLName xml.Name `xml:"failure"`
                Text    string   `xml:",chardata"`
@@ -364,20 +366,48 @@
        }
 }
 
-func directTLS(server string, transport string, tlsConfig *tls.Config) {
-       c, err := tls.Dial(transport, server, tlsConfig)
+func directTLS(recordType string, conn net.Conn, tlsConfig *tls.Config) {
+       c := tls.Client(conn, tlsConfig)
+       err := c.Handshake()
        if err != nil {
                if err.Error() == "EOF" {
-                       fmt.Println("StartTLS:", statusNOK)
+                       fmt.Println("TLS:", statusNOK)
                        fmt.Println("Received EOF during handshake.")
                } else {
                        fmt.Println("TLS:", statusNOK)
                        fmt.Println(err)
                }
        } else {
-               fmt.Println("TLS:", statusOK)
-               checkCertExpiry(c)
-               c.Close()
+               startStream := "<stream:stream 
xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:" +
+                       recordType + "' to='" + tlsConfig.ServerName + "' 
version='1.0'>\n"
+               _, err := c.Write([]byte(startStream))
+               if err != nil {
+                       fmt.Println("TLS:", statusNOK)
+                       fmt.Println(err)
+                       return
+               }
+               buf := make([]byte, 4096)
+               _, err = c.Read(buf)
+               if err != nil {
+                       fmt.Println("TLS:", statusNOK)
+                       if err.Error() == "EOF" {
+                               fmt.Println("Server sent EOF.")
+                       } else {
+                               fmt.Println(err)
+                       }
+                       return
+               }
+               if strings.Contains(strings.ToLower(string(buf[:])), 
"<stream:stream") &&
+                       (strings.Contains(strings.ToLower(string(buf[:])),
+                               
"xmlns:stream='http://etherx.jabber.org/streams'") ||
+                               
strings.Contains(strings.ToLower(string(buf[:])),
+                                       
`xmlns:stream="http://etherx.jabber.org/streams"`)) {
+                       fmt.Println("TLS:", statusOK)
+                       checkCertExpiry(c)
+               } else {
+                       fmt.Println("TLS:", statusNOK)
+                       fmt.Println("XMPP stream negotiation failed.")
+               }
        }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmpp-dns-0.3.1/man/xmpp-dns.1 
new/xmpp-dns-0.3.2/man/xmpp-dns.1
--- old/xmpp-dns-0.3.1/man/xmpp-dns.1   2022-08-21 12:45:40.000000000 +0200
+++ new/xmpp-dns-0.3.2/man/xmpp-dns.1   2022-10-06 12:43:07.000000000 +0200
@@ -1,6 +1,6 @@
 .\" generated with Ronn-NG/v0.9.1
 .\" http://github.com/apjanke/ronn-ng/tree/0.9.1
-.TH "XMPP\-DNS" "1" "July 2022" ""
+.TH "XMPP\-DNS" "1" "September 2022" ""
 .SH "NAME"
 \fBxmpp\-dns\fR \- A CLI tool to check XMPP SRV records\.
 .SH "SYNOPSIS"
@@ -40,7 +40,7 @@
 Test connection and certificates\.
 .TP
 \fB\-\-timeout\fR=[\fIvalue\fR]
-Connection timeout in secons\. Default: 60\.
+Connection timeout in seconds\. Default: 60\.
 .TP
 \fB\-\-tls\-version\fR=[\fIvalue\fR]
 Minimal TLS version\. 10 (TSLv1\.0), 11 (TLSv1\.1), 12 (TLSv1\.2) or 13 
(TLSv1\.3)\. Default: 12\.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmpp-dns-0.3.1/man/xmpp-dns.1.html 
new/xmpp-dns-0.3.2/man/xmpp-dns.1.html
--- old/xmpp-dns-0.3.1/man/xmpp-dns.1.html      2022-08-21 12:45:40.000000000 
+0200
+++ new/xmpp-dns-0.3.2/man/xmpp-dns.1.html      2022-10-06 12:43:07.000000000 
+0200
@@ -115,7 +115,7 @@
 <dd>Test connection and certificates.</dd>
 <dt>
 <code>--timeout</code>=[<var>value</var>]</dt>
-<dd>Connection timeout in secons. Default: 60.</dd>
+<dd>Connection timeout in seconds. Default: 60.</dd>
 <dt>
 <code>--tls-version</code>=[<var>value</var>]</dt>
 <dd>Minimal TLS version. 10 (TSLv1.0), 11 (TLSv1.1), 12 (TLSv1.2) or 13 
(TLSv1.3).
@@ -146,7 +146,7 @@
 
   <ol class='man-decor man-foot man foot'>
     <li class='tl'></li>
-    <li class='tc'>July 2022</li>
+    <li class='tc'>September 2022</li>
     <li class='tr'>xmpp-dns(1)</li>
   </ol>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmpp-dns-0.3.1/man/xmpp-dns.1.ronn 
new/xmpp-dns-0.3.2/man/xmpp-dns.1.ronn
--- old/xmpp-dns-0.3.1/man/xmpp-dns.1.ronn      2022-08-21 12:45:40.000000000 
+0200
+++ new/xmpp-dns-0.3.2/man/xmpp-dns.1.ronn      2022-10-06 12:43:07.000000000 
+0200
@@ -43,7 +43,7 @@
 Test connection and certificates.
 
 * `--timeout`=[<value>]:
-Connection timeout in secons. Default: 60.
+Connection timeout in seconds. Default: 60.
 
 * `--tls-version`=[<value>]:
 Minimal TLS version. 10 (TSLv1.0), 11 (TLSv1.1), 12 (TLSv1.2) or 13 (TLSv1.3).

Reply via email to