[gnutls-devel] GnuTLS | gnutls-cli cannot specify server name while doing xmpp starttls (#777)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Wed May 29 19:46:52 CEST 2019




This line https://gitlab.com/gnutls/gnutls/blob/master/src/socket.c#L250 is always using socket. 

Maybe we can reuse --verify-hostname arg for that, or create a new "request hostname/xmpp host" (as openssl does):

```
// NOT TESTED
const char *host;
if (HAVE_OPT(VERIFY_HOSTNAME)) {
	host = OPT_ARG(VERIFY_HOSTNAME);
	canonicalize_host((char *) host, NULL, 0);
} else
	host = socket->hostname;
snprintf(buf, sizeof(buf), "<stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' to='%s' version='1.0'>\n", host);
```

Or redefine socket->hostname inside socket_open2 after conn is openned. Or even a new field in socket for that.

I don't know what is the best option. I only know that socket->hostname used by STARTTLS (any protocol) should be user definable.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/issues/777#note_175952489
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/20190529/992334ea/attachment.html>


More information about the Gnutls-devel mailing list