Open yyamano opened 6 years ago
The specification of the SSL class is that it can not be used in hook of HTTP request processing. I would like to be able to handle errors by using flags related to phases at run time inside classes and methods.
In the implementation of trusterd, the request structure has information on each phase, and each method itself determines whether it is a phase that can be executed.
ref: https://github.com/matsumotory/mruby-http2/blob/master/src/mrb_http2_request.h#L21
@matsumotory I just want to make sure that Nginx::SSL works only in the handshake and the verify client handler.
Nginx::SSL class only works in ssl_handshake_handle for now. I do not assume that methods of SSL class except accept_client and reject_client work in verify client handler.
Will take care of it. We need to add the limitations to doc too.
I added the limitation to docs/class_and_method/README.md#nginxssl-class.
Nginx::SSL class is designed to be used in the ssl handshake handlers. It doesn't work in other handlers like mruby_content_handler_code.
lgtm!
Nginx::SSL#servername doesn't work in content handler. Not sure if it's a bug or unexpected usage. Other SSL methods might have similar issue.
I get SIGSEGV without ssl handshake handler. With the handler, Nginx::SSL#servername returns empty string.