I've set a servername callback using SSL_CTX_set_tlsext_servername_callback.

    SSL_CTX_set_tmp_dh_callback(ctx, edh_cb);
    SSL_CTX_set_tlsext_servername_callback(ctx, servername_cb);

I verified the callback was set in the context object:

    gdb> p *server_ctx
    ...
    client_cert_engine = 0x0,
    tlsext_servername_callback = 0x40e787 <servername_cb(SSL*, int*, void*)>,
    tlsext_servername_arg = 0x0,
    ...

I perform the the following to connect to the server:

    openssl s_client -tls1 -servername localhost -connect localhost:8443

The server accepts, but the callback is not invoked when the server
breaks from accept.

Any ideas what I might be doing wrong?

Thanks in advance.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to