+
+MacOS Keychain Access Window, accessible from settings page
+
+
+On Mac, it is called Keychain Access. To add a certificate, drag the pfx file onto Keychain Access. You'll need to
+input the exact export password when you convert the crt file to pfx/p12 format.
+
+When you click Manage device certificate from the browser setting page, this window will open on Windows. You can import
+the pfx file using this window.
+
+
+
+Certificates dialog on Widows, open from chrome settings page
+
+
+Alternatively, you can use the certmgr to import the certificate. You can open it from the Windows setting or Control Panel.
+
+
+
+Windows certificates manager, accessible from Control Panel
+
+
+### Mozilla Firefox
+
+Firefox has its own Certificate Manager dialog. You can import and manage the certificate from it. It also connects to
+the operating system certificate management.
+
+
+
+Mozilla Firefox Certificate Manager
+
+
+---
+
+## Testing
+
+You can use any browser or tool, like cURL, to test the client certificate verification setup. If your client
+certificate verification succeeds, you can open the page using a browser. If your browser shows something like
+403 Forbidden, it means either your browser does not have the certificate or something wrong in your setup.
+
+### cURL
+
+Without a valid client certificate
+
+```sh
+curl -v https://www.example.com/
+```
+
+response
+
+```
+> GET / HTTP/2
+> Host: www.example.com
+> user-agent: curl/7.74.0
+> accept: */*
+>
+< HTTP/2 403
+< server: nginx
+< date: Wed, 12 Jul 2023 04:54:02 GMT
+< content-type: text/html
+< content-length: 146
+<
+
+403 Forbidden
+
+
403 Forbidden
+
nginx
+
+
+```
+
+With a valid client certificate
+
+```sh
+curl --cert user.crt --key user.key -v https://www.example.com/
+```
+
+response
+
+```
+> GET / HTTP/2
+> Host: www.example.com
+> user-agent: curl/7.74.0
+> accept: */*
+>
+< HTTP/2 200
+< server: nginx
+.
+.
+.
+snipped
+```
+
+---
+
+## Revoking Access
+
+This setup recognizes users by the certificate they are using. Revoking access here means revoking the users'
+certificates. We can achieve this by leveraging OpenSSL's CRL feature. To use it, we need to have the CA database.
+I explained how to set it up in the section above.
+
+### Revoke client certificate
+
+```sh
+openssl ca -config ca.cnf -revoke user.crt
+```
+
+### Generate CRL file
+
+```sh
+openssl ca -config ca.cnf -gencrl -out crl.pem
+```
+
+### Verifying CRL file
+
+```sh
+openssl crl -in crl.pem -noout -text
+```
+
+### Nginx configuration for CRL
+
+You need to add the `ssl_crl` directive in the Nginx configuration file, as shown in the example below.
+
+```nginx
+ ....
+ ssl_client_certificate /path/to/client/verification/ca.crt;
+ ssl_verify_client optional;
+ ssl_verify_depth 2;
+ ssl_crl /path/to/crl.pem; # configure nginx to read the crl file
+
+
+ root /usr/share/nginx/html;
+ ....
+```
+