How to handle servername indication with openssl library from server
Skip Carter
skip at taygeta.com
Wed Jun 19 15:06:31 UTC 2019
if this is a C++ program, be sure to use C linkage for the callback
e.g.
extern "C" {
> static int ssl_servername_cb(SSL *ssl, int *ad, void *arg)
> {
> if (ssl == NULL)
> return SSL_TLSEXT_ERR_NOACK;
>
> const char* servername = SSL_get_servername(ssl,
> TLSEXT_NAMETYPE_host_name);
> printf("ServerName: %s\n", servername);
> }
}
That is all I can think of.
--
Dr Everett (Skip) Carter
skip at taygeta.com
Taygeta Scientific Inc
607 Charles Ave
Seaside CA 93955
831-641-0645 x103
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20190619/78169f97/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: This is a digitally signed message part
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20190619/78169f97/attachment.sig>
More information about the openssl-users
mailing list