# OPENSSL_CONF=/etc/opt/openssl/openssl.cnf
# export OPENSSL_CONF
Creamos la nueva Autoridad de Certificación (AC):#
CA.pl -newca
(script genérico, haz click para +info)CA certificate filename (or enter to create)
Making CA certificate ...
Using configuration from /export/home/ca/etc/openssl.cnf
Generating a 1024 bit RSA private key
...........++++++
...++++++
writing new private key to './CA/private/cakey.pem'
Enter PEM pass phrase:
Verifying password - Enter PEM pass phrase:
-----
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) [
ES]:
State or Province Name (full name) [
Provincia]:
Locality Name (eg, city) :[
Provincia]
Organization Name (eg, company) [
Compañia]:
Organizational Unit Name (eg, section) :[
Departamento]
Common Name (eg, YOUR name) :[
Mi Certificacion]
Email Address :[
email@lokesea.com]
Hacemos unac copia del certificado CA en formato DER:# openssl crl2pkcs -nocrl -certfile cacert.pem -outform DER -out cacert.der
Configuramos el servidor web para que provea la autoridad de certificación para Netstcape e Internet Explorer
Incluir estas líneas en el fichero httpd.conf
[virtualhost 3=""]
ServerAdmin
webmaster@dominio.comDocumentRoot "
/opt/apache/htdocs/ca.dominio.com"
ServerName
ca.dominio.comErrorLog
/var/opt/apache/logs/ca.dominio.com-error_logCustomLog
/var/opt/apache/logs/ca.dominio.com-access_log commonScriptAlias /cgi-bin/ "
/opt/apache/htdocs/ca.dominio.com/cgi-bin/"
[directory opt="" apache="" htdocs="" es="" bin=""]
AllowOverride None
Options None
Order allow,deny
Allow from all
[/directory]
[/virtualhost]
Creamos el siguiente script en /opt/apache/htdocs/ca.dominio.com/cgi-bin/getca
#!/bin/sh
#
echo "Content-type: application/x-x509-ca-cert"
echo
/usr/bin/cat
/opt/apache/htdocs/ca.dominio.com/cacert.derDespues de estos pasos ya tenemos la Autoridad de Certificación creada y el servidor web configurado para dispensar el certificado de la Autoridad de Certificación.
No hay comentarios:
Publicar un comentario