It's OK that I have to use this function, but what I don't understand is why do I have to use it? Why do I have to set an arbitrary string? Why doesn't openssl do this internally so that I don't have to know about an obscure thing to set to make it work.
On Sep 26, 2014 3:18 AM, "Viktor Dukhovni" <[email protected]> wrote: > > On Thu, Sep 25, 2014 at 02:51:16PM +0200, DEXTER wrote: > > > Also checking openssl source (apps/s_server.c) to find out why it > > works with plain s_client, s_server, I see this: > > > > static int s_server_session_id_context = 1; /* anything will do */ > > > > SSL_CTX_set_session_id_context(ctx,(void*)&s_server_session_id_context, > > sizeof s_server_session_id_context); > > > > Can anybody tell me what the hell is this hack? anything will do? &int > > converted to void*, when the function itself should get a const > > unsigned char*? What? > > While RTFS is a fine strategy, generally RTFM first: > > https://www.openssl.org/docs/ssl/SSL_CTX_set_session_id_context.html > > Postfix uses: > > static const char server_session_id_context[] = "Postfix/TLS"; > SSL_CTX_set_session_id_context(ctx, > (void *) &server_session_id_context, > sizeof(server_session_id_context)); > > You should use something that identifies your application. > > -- > Viktor. > ______________________________________________________________________ > OpenSSL Project http://www.openssl.org > User Support Mailing List [email protected] > Automated List Manager [email protected]
