OpenVPN-2.1.1HowTo/Crear el CA

De WikiCabal
Ir a la navegación Ir a la búsqueda

Crear el CA

[root@charon 2.0]# ./build-ca
Generating a 1024 bit RSA private key
.......++++++
...................................................++++++
writing new private key to 'ca.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [MX]:
State or Province Name (full name) [Jalisco]:
Locality Name (eg, city) [Guadalajara]:
Organization Name (eg, company) [LinuxCabal A.C.]:
Organizational Unit Name (eg, section) []:Tutorial
Common Name (eg, your name or your server's hostname) [LinuxCabal A.C. CA]:charon.linuxcabal.org
Name []:rrc
Email Address [rrc@LinuxCabal.org]:
[root@charon 2.0]# 
[root@charon 2.0]# ls -al keys
total 24
drwxr-xr-x 2 root root 4096 2012-10-17 16:30 ./
drwxr-xr-x 3 root root 4096 2012-10-17 16:03 ../
-rw-r--r-- 1 root root 1452 2012-10-17 16:30 ca.crt
-rw------- 1 root root  916 2012-10-17 16:30 ca.key
-rw-r--r-- 1 root root  245 2012-10-17 16:05 dh1024.pem
-rw-r--r-- 1 root root    0 2012-10-17 15:27 index.txt
-rw-r--r-- 1 root root    3 2012-10-17 15:25 serial
[root@charon 2.0]# 
[root@charon 2.0]# cat keys/serial 
00
[root@charon 2.0]# 
[root@charon 2.0]# cat keys/ca.key 
-----BEGIN PRIVATE KEY-----
MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAK/LvjVRYIoEdUms
L+TYEnnDuBi/yEWoEkPe+TdXjKN3RFLY50tNN2xCNE8oT4/cpFOvhYT84ZlwVMg0
i8PUzXdKY08drihd2CLDLm/ZFf/Yj2NXlICy0bW9vhS6LLS8nZ6e082AF1Ciyhwz
rwDyb3RKndKNyZ9bMMeD4fHzMXrtAgMBAAECgYAwtETtZq9VbajFEYRvZYGw5I2j
pbapvcfZr/Ph5kqbm1Z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