how to create a ca Certificate Authority in RHEL 6.x

  1. Change directory to the default CA directory:
    # cd /etc/pki/CA
  2. Create an index file for new certs:
    # touch index.txt
  3. Set first certificate number:
    # echo ’01′ > serial
    # echo ’01′ > crlnumber
  4. Create your CA cert and private key for your CA server:
    # openssl req -new -x509 -extensions v3_ca -keyout private/ca-cert.key -out certs/ca-cert.crt -days 365
    Enter PEM pass phrase: <your passpharse>
    Confirm PEM pass phrase: <your passpharse>
    Country Name: IN
    State: West bengal
    City: Kolkata
    Organization: Example
    Organizational Unit: Example
    Common Name: CA
    E-mail Address: [email protected]
  5. Set permissions on your private key:
    # chmod 400 private/ca-key.key
Now when you get a new certificate request, the following action need to perform to  generate a new cert signed by ca server :
  1. From your CA server, change directory to /etc/pki/CA
    # cd /etc/pki/CA
  2. Copy your certificate request to the /etc/pki/CA/crl directory
    # cp /root/ds1.csr /etc/pki/CA/crl
  3. Sign your cert using your CA
    # openssl ca -in crl/ds1.csr -out newcerts/ds1.pem -keyfile private/ca-cert.key -cert certs/ca-cert.crt
    Sign cert? y
    Commit? y

Comments

Popular posts from this blog

Running web ssh client on port 443 /80 with nginx as reverse proxy

Running cockpit behind nginx reverse proxy with nginx ssl and cockpit non ssl

Setup VOD streaming server with nginx using RTMP on Ubuntu 18.04