[gnutls-devel] GnuTLS | gnutls-cli starttls connection to XMPP fails with 'error receiving <proceed' (#1507)
Read-only notification of GnuTLS library development activities
gnutls-devel at lists.gnutls.org
Fri Oct 13 04:14:45 CEST 2023
Daiki Ueno commented: https://gitlab.com/gnutls/gnutls/-/issues/1507#note_1601285352
This is caused by a hostname mismatch, according to wireshark:
```console
XMPP Protocol
eXtensible Markup Language
<stream:error>
<host-unknown
xmlns='urn:ietf:params:xml:ns:xmpp-streams'/>
</stream:error>
[Expert Info (Note/Undecoded): Unknown packet: error]
[Unknown packet: error]
[Severity level: Note]
[Group: Undecoded]
```
If I specify the correct hostname as with `-xmpphost` of openssl s_client, that works fine:
```diff
diff --git a/src/socket.c b/src/socket.c
index b3ed84c5a3..85a27fc6df 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -240,7 +240,7 @@ static void socket_starttls(socket_st *socket)
snprintf(
buf, sizeof(buf),
"<stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' to='%s' version='1.0'>\n",
- socket->hostname);
+ "molgen.mpg.de");
send_line(socket, buf);
wait_for_text(socket, "<?", 2);
send_line(
```
I can add a new option to gnutls-cli if it's useful.
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/issues/1507#note_1601285352
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20231013/572113f3/attachment.html>
More information about the Gnutls-devel
mailing list