[gnutls-devel] gnutls-cli vs service name

Nikos Mavrogiannopoulos n.mavrogiannopoulos at gmail.com
Wed May 10 10:54:43 CEST 2017


On Mon, May 8, 2017 at 7:38 PM, James Cloos <cloos at jhcloos.com> wrote:
> The starttls support can be done on top of that pull.
>
> All it needs is to use OPT_ARG(SNI_HOSTNAME) instead of socket->hostname
> when HAVE_OPT(SNI_HOSTNAME).  And only smtp, lmtp and xmpp use that.
>
> I'm not sure of the best way to pass OPT_ARG(SNI_HOSTNAME) to socket_open()
> and on to socket_starttls().  Would another const char* and another FLAG
> work?  Or just a const char* which is ignored if NULL?
> (Inclidently, my earlier note of missing pg support was daft.  It is not
> mentioned in the man page, but seeing it in the code reminds me that it
> was announced some time back, and I thing I congradulated that announce.)

Maybe splitting socket_open() to socket_init() and socket_open() would
allow simplifying that. We can then have:
socket_init()
socket_set_sni_hostname()
socket_open()

and socket_starttls() could read the sni hostname when needed. What do
you think?

regards,
Nikos



More information about the Gnutls-devel mailing list