Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Jan Just Keijser. OpenVPN 2 Cookbook (2011).pdf
Скачиваний:
193
Добавлен:
18.03.2016
Размер:
10.98 Mб
Скачать

PKI, Certificates, and OpenSSL

5. In the next dialog, click on Always trust this certificate and then on OK:

By trusting the CA certificate, it will allow us to generate and sign new certificates.

How it works...

xCA stores all the public and private keys in a database. This database must be protected using a strong password, as it can be used to sign and revoke all the certificates that we want to use in our OpenVPN setups.

There's more...

For this recipe, we choose xCA as the PKI solution. There are many PKI solutions available, both open source and commercial. For example:

tinyCA: http://tinyca.sm-zone.net/

OpenCA: http://www.openca.org

xCA: a GUI for managing a PKI (Part 2)

This recipe is the second part explaining how to use xCA, a graphical tool for managing a public key infrastructure (PKI). In this recipe, we create a new certificate using the xCA GUI.

108

Chapter 4

Getting ready

First, read the previous recipe and follow the instructions.

How to do it...

1.Start xCA and open our database using File | Open Database. Click on the tab

Certificates and then right-click on our CA certificate. Choose the option New certificate. A dialog box will appear. Click on the tab Source and fill in the details

Internal name, Country Code, Organisation, Common name, and Email Address:

109

PKI, Certificates, and OpenSSL

2. Do not press OK; press Generate a new key first:

Select the Keysize as 1024 bit (or higher, if desired) and click on the Create button.

3. Next, fill in the tab Extensions as follows:

110

Chapter 4

Select for Type, End Entity.

Mark the checkbox Subject Key Identifer as enabled.

Mark the checkbox Authority Key Identifer as enabled.

4.Finally, go to the tab Key Usage and do as follows:

In the column Key Usage, select Digital Signature.

In the column Extended Key Usage, select TLS Web Client Authentication for an OpenVPN client certificate. For an OpenVPN server certificate, choose TLS Web Server Authentication. Never choose both for the same certificate! Press OK to generate the certificate.

111