I am developing an "nginx" module and want to fetch client side certificate in my c code. I am unable to figure out how to do so in my custom module. I tried searching online but the closest I could get was
ssl_verify_client optional_no_ca;
.
.
.
add-header X-Client-Cert $ssl_client_certificate
Using this I can add the header X-Client-Cert
to the output but what I really want is to be able to extract the certificate in my nginx module and extract the CName from the certificate for authentication.
I was able to get it working with ngx_http_get_variable
API
Documentation - https://www.nginx.com/resources/wiki/extending/api/variables/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.