Code Monkey home page Code Monkey logo

Comments (1)

Water-Melon avatar Water-Melon commented on June 14, 2024

Sorry for replying you such late, and it is unfortunate I don't know it either.
Here is the answer that chatgpt gives:

Nginx does not natively support the generation of SSL key log files. However, you can use a workaround by using the openssl library to generate the SSL key log file. Here's how you can do it:

  1. Recompile OpenSSL with debugging enabled

First, you need to recompile OpenSSL with the sslkeylogfile feature enabled. You can do this by setting the SSLKEYLOGFILE environment variable when compiling OpenSSL.

  1. Recompile Nginx with the debug-enabled OpenSSL

After recompiling OpenSSL, you need to recompile Nginx with the newly compiled OpenSSL.

Here's an example of how you can do this:

# Download and extract the OpenSSL source code
wget https://www.openssl.org/source/openssl-1.1.1k.tar.gz
tar xzvf openssl-1.1.1k.tar.gz

# Compile OpenSSL with debugging enabled
cd openssl-1.1.1k
./config enable-ssl-trace enable-tls1_3 --prefix=/usr/local/ssl
make
sudo make install

# Download and extract the Nginx source code
wget http://nginx.org/download/nginx-1.19.10.tar.gz
tar xzvf nginx-1.19.10.tar.gz

# Compile Nginx with the debug-enabled OpenSSL
cd nginx-1.19.10
./configure --with-http_ssl_module --with-openssl=../openssl-1.1.1k
make
sudo make install
  1. Set the SSLKEYLOGFILE environment variable

After recompiling Nginx, you can set the SSLKEYLOGFILE environment variable to the path where you want to save the SSL key log file.

export SSLKEYLOGFILE=/path/to/your/sslkeylogfile
  1. Restart Nginx

Finally, restart Nginx to apply the changes.

sudo service nginx restart

Now, Nginx should generate an SSL key log file at the specified path when handling SSL/TLS connections.

Please note that this method is not recommended for production environments due to the potential security risks associated with logging SSL keys.

from ngx_http_autoquic_module.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.