[openssl-users] Example on SSL_SESSION_set_ex_data?

Eric To totszwai at gmail.com
Wed Aug 24 19:50:07 UTC 2016


Can someone give an example on how to use the SSL_SESSION_set_ex_data?
I'm trying to set custom information in apache mod_ssl and after trying
many different ways, but can't get it to stick...

struct st_blah_t {
  int blah;
} BLAH;

my_data_idx = SSL_SESSION_get_ex_new_index(0, "BLAH", NULL, NULL, NULL);

BLAH b;
b.blah = 12345;

SSL_SESSION *session = SSL_get_session(ssl);
SSL_SESSION_set_ex_data(session, my_data_idx, &b);
SSL_set_session(ssl, sess);

Am I using the functions right?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20160824/6b4e92b0/attachment-0001.html>


More information about the openssl-users mailing list