Debo remarcar que los certificados que vamos a generar son apropiados solamente para hacer testing y de ninguna manera deben considerarse ser utilizados en entornos productivos ya que lo adecuado es generar certificados CON passphrase, algoritmos de encriptación más fuertes y ser firmados por alguna compañia certificadora como Verisign.
1. Generar una llave privada sin passphrase de 1024 bits:
# openssl genrsa -out server.key 10242. Generar el CSR (Certificate Sign Request):
# openssl req -new -key server.key -out server.csrContestar las siguientes preguntas:
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) []: (Ej: AR para Argentina)
State or Province Name (full name) []: (Ej: Buenos Aires)
Locality Name (eg, city) []: (Ej: Microcentro)
Organization Name (eg, company) []: (Ej: NandoX)
Organizational Unit Name (eg, section) []: (Ej: Desarrollo)
Common Name (eg, fully qualified host name) []: (Ej: nandox.com)
Email Address []: (Ej: ejemplo@nandox.com)
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []: (No ingresar nada, pulsar )
An optional company name []: (No ingresar nada, pulsar )
3. Autofirmar nuestro certificado con un año de expiración (CRT):
# openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt4. Por último generamos el archivo PEM:
# cat server.key server.crt > server.pem
Leer más...









