Nginx + lua-nginx, get ssl_session_id

VladimirSmirnov nginx-forum at nginx.us
Wed Nov 26 16:29:33 UTC 2014


Hi!

I'm trying to modify one of auth modules for nginx and I need to get content
of either ssl_session_id or any other ssl_* variables with uniq client id to
identify connection. But I've got a problems with accessing to this
variables from lua.

For testing purposes I'm using self-signed ssl cert.

ngx.log(ngx.DEBUG, "session_id=", ngx.var.ssl_session_id) prints "nil" in
the logs. How can I get access to this variable?

lua script is called with access_by_lua directive.

Thanks in advance!

P.S. If I do "set $test_session_id $ssl_session_id;" in config,
test_session_id var is also empty.

Best regards,
Vladimir Smirnov.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,255157,255157#msg-255157



More information about the nginx mailing list