Правильное убийство сертификатов OpenVPN (revoke keys)

Правильное убийство сертификатов OpenVPN (revoke keys)

Revoking Certificates

Revoking a certificate means to invalidate a previously signed certificate so that it can no longer be used for authentication purposes.

Typical reasons for wanting to revoke a certificate include:

The private key associated with the certificate is compromised or stolen.
The user of an encrypted private key forgets the password on the key.
You want to terminate a VPN user’s access.
Example

As an example, we will revoke the client2 certificate, which we generated above in the «key generation» section of the HOWTO.

First open up a shell or command prompt window and cd to the easy-rsa directory as you did in the «key generation» section above. On Linux/BSD/Unix:

. ./vars
./revoke-full client2
On Windows:

vars
revoke-full client2
You should see output similar to this:

Using configuration from /root/openvpn/20/openvpn/tmp/easy-rsa/openssl.cnf
DEBUG[load_index]: unique_subject = «yes»
Revoking Certificate 04.
Data Base Updated
Using configuration from /root/openvpn/20/openvpn/tmp/easy-rsa/openssl.cnf
DEBUG[load_index]: unique_subject = «yes»
client2.crt: /C=KG/ST=NA/O=OpenVPN-TEST/CN=client2/emailAddress=me@myhost.mydomain
error 23 at 0 depth lookup:certificate revoked
Note the «error 23» in the last line. That is what you want to see, as it indicates that a certificate verification of the revoked certificate failed.

The revoke-full script will generate a CRL (certificate revocation list) file called crl.pem in the keys subdirectory. The file should be copied to a directory where the OpenVPN server can access it, then CRL verification should be enabled in the server configuration:

crl-verify crl.pem
Now all connecting clients will have their client certificates verified against the CRL, and any positive match will result in the connection being dropped.

https://openvpn.net/index.php/open-source/documentation/howto.html#revoke

Добавить комментарий

Ваш адрес email не будет опубликован.