Created
May 5, 2014 17:30
-
-
Save pedroagabreu/fbcf8ed5eb03cf533c1f to your computer and use it in GitHub Desktop.
Client certificate verification in Apache.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# verify client certificates using CA.pem | |
SSLEngine on | |
SSLCertificateFile /etc/apache2/ssl/ServerCertAndKey.pem | |
SSLCACertificateFile /etc/apache2/ssl/CA.pem | |
SSLVerifyClient require | |
SSLVerifyDepth 1 | |
# allow connections from certain CN only, except for that guy | |
SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)-/ and %{SSL_CLIENT_S_DN_CN} =~ m/^ROBOTS/ and %{SSL_CLIENT_S_DN_CN} !~ m/^ROBOTS - Bad Robot/ ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment