ssl_crl

The `ssl_crl` directive specifies a Certificate Revocation List (CRL) file to check for revoked SSL certificates.

Syntaxssl_crl path;
Defaultnone
Contexthttp, server
Arguments1

Description

The ssl_crl directive is used in NGINX when configuring SSL/TLS to specify a file that contains a list of revoked certificates. This feature is crucial for maintaining secure communications, as it allows the server to verify whether a client's SSL certificate has been revoked before establishing a connection. The directive can be placed in the http or server block within the NGINX configuration, ensuring that the defined CRL is referenced during the SSL handshake process.

When the client presents its certificate, NGINX checks this list alongside any other certificate validation policies it follows. The CRL file specified by ssl_crl must be formatted correctly and accessible to NGINX. This command helps in avoiding the acceptance of certificates that are no longer valid, thus improving the overall security of the application by blocking potential attackers that might be using compromised credentials. If the CRL file is not found or unreadable, it can lead to errors during the SSL handshake, affecting users trying to access the service.

Importantly, the ssl_crl directive can only take one argument — the path to the CRL file. It's advisable to keep the list updated and monitor certificate statuses actively, providing a safer environment for end users. The use of CRLs does come with some drawbacks; for instance, they may not always provide real-time updates unless performed manually or set to update frequently.

Config Example

http {
    server {
        ssl on;
        ssl_certificate /etc/ssl/certs/server.crt;
        ssl_certificate_key /etc/ssl/private/server.key;
        ssl_crl /etc/ssl/crl/ca.crl;
    }
}

Ensure the CRL file is in the correct format and accessible to NGINX.

If the path provided to ssl_crl is incorrect or if the file is unreadable, SSL connections may fail.

Keep the CRL file updated to avoid rejecting valid certificates.

← Back to all directives