Wednesday, 5 December 2012

OpenSSL Frequently Used Commands

1. Generate SSL Private key with passphrase
     #openssl genrsa -des3 -out server.key 1024

2. Generate SSL Private key without passphrase
     #openssl genrsa -out server.key 2048

3. Generate a CSR (Certificate Signing Request)
     #openssl req -new -key server.key -out server.csr

4. Check Open-ssl Version
     #openssl version -d  , openssl version -a
 
5. Check Key Password confirmation
     #openssl rsa -in xxxxxxxx.com.key.pem -out server.key

6. View certificate Details of pem File use the Below Command
     #openssl x509 -text -in xxxxxx.pem

7. Generate The Open-ssl with Version 3
     #openssl x509 -req -days 365 -in domain.com.csr.pem -extfile /etc/pki/tls/openssl.cnf -extensions v3_ca -signkey domain.com.key.pem -out domain.com.crt.pem

8. Remove Passphrase from Key
     #cp server.key server.key.org
     #openssl rsa -in server.key.org -out server.key

9. Set new passpharse
     # openssl rsa -des3 -in server.key -out server.key.new
     # mv server.key.new server.key

10. Generating a Self-Signed Certificate
     #openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

11. View the certificate Information
     #openssl x509 -noout -fingerprint -text < server.cert > host.info

12. View who issued the cert?
     #openssl x509 -noout -in cert.pem -issuer

13. View to whom was it issued
     #openssl x509 -noout -in cert.pem -subject

14. View the valid date of the certificate
     #openssl x509 -noout -in cert.pem -dates

15. Generating P12 Certificate for Tomcat
     #/usr/sfw/bin/openssl pkcs12 -export -in public-cert.pem -inkey private-key.pem -out my_pkcs12.p12

16. View PKCS12 cert
     #openssl pkcs12 -info -nodes -in <cert.p12>

17. Generate the key and CSR with SHA1 method
     #openssl genrsa -des3 -out server.key.pem 2048
     #openssl req -new -sha1 -key server.com.key.pem -out server.csr.pem

18. Converting the certificate in .cer format to .pem format
     #openssl x509 -inform der -in servercert.cer -out servercert.pem

19. Mergring and converting Server Private key, Server Certificate and CA certificate into PKCS#12 format
     #openssl pkcs12 -export -in servercert.pem -inkey  serverprivatekey.pem -name "MY CERTIFICATE" -certfile cacert.pem -out mycert.p12

24 comments:

  1. Thanks for sharing this informative blog. Those who want to become a certified unix professional reach FITA, Which offers best Unix Course Chennai with years of experienced professionals.

    ReplyDelete
  2. This is certainly one of the most valuable article. Great tips from beginning to till end. Lot of information are available here.Super article. AWS Training in chennai | AWS Training chennai | AWS course in chennai

    ReplyDelete
  3. Your posts is really helpful for me.Thanks for your wonderful post. I am very happy to read your post. VMWare Training in chennai | VMWare Training chennai | VMWare course in chennai

    ReplyDelete
  4. There are lots of information about latest technology and how to get trained in them, like Best Hadoop Training In Chennai have spread around the web, but this is a unique one according to me. The strategy you have updated here will make me to get trained in future technologies Hadoop Training in Chennai By the way you are running a great blog. Thanks for sharing this blogs..

    ReplyDelete
  5. I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing..
    SalesForce Training in Chennai

    ReplyDelete
  6. Pretty article! I found some useful information in your blog, it was awesome to read,thanks for sharing this great content to my vision, keep sharing..
    Unix Training In Chennai

    ReplyDelete
  7. This information is impressive..I am inspired with your post writing style & how continuously you describe this topic. After reading your post,thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic
    Android Training In Chennai In Chennai

    ReplyDelete
  8. SAP Training in Chennai
    This post is really nice and informative. The explanation given is really comprehensive and informative..

    ReplyDelete
  9. Oracle Training in chennai
    Thanks for sharing such a great information..Its really nice and informative..

    ReplyDelete
  10. Selenium Training in Chennai
    Wonderful blog.. Thanks for sharing informative blog.. its very useful to me..

    ReplyDelete
  11. Data warehousing Training in Chennai
    I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly..

    ReplyDelete
  12. Whatever we gathered information from the blogs, we should implement that in practically then only we can understand that exact thing clearly, but it’s no need to do it, because you have explained the concepts very well. It was crystal clear, keep sharing..
    Websphere Training in Chennai

    ReplyDelete
  13. Oracle DBA Training in Chennai
    Thanks for sharing this informative blog. I did Oracle DBA Certification in Greens Technology at Adyar. This is really useful for me to make a bright career..

    ReplyDelete
  14. This information is impressive; I am inspired with your post writing style & how continuously you describe this topic. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic..
    Selenium Training in Chennai | QTP Training in Chennai

    ReplyDelete
  15. Thanks for Information Oracle Apps Technical is a collection of a bunch of collected applications like accounts payables, purchasing, inventory, accounts receivables, human resources, order management, general ledger and fixed assets, etc which have its own functionality for serving the business
    Oracle Apps Training In Chennai

    ReplyDelete
  16. Oracle Training in chennai | Oracle D2K Training In chennai
    This information is impressive; I am inspired with your post writing style & how continuously you describe this topic. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic..

    ReplyDelete
  17. Really awesome blog. Your blog is really useful for me. Thanks for sharing this informative blog. Keep update your blog.
    Oracle Training In Chennai

    ReplyDelete
  18. Best Java Training Institute In ChennaiThis information is impressive; I am inspired with your post writing style & how continuously you describe this topic. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic..

    ReplyDelete
  19. Corporate Training Companies in India Corporate Training Companies in India Corporate Training in Chennai Corporate Training in Chennai Corporate Training Companies in India Corporate Training Companies in India

    ReplyDelete
  20. Yeoman Training Yeoman Training D3 Training in CHennai D3 Training ReactJS Training in CHennai ReactJS Training | Gulp Training CommonJS Training in Chennai CommonJS Training

    ReplyDelete
  21. Hibernate Training Institutes in ChennaiHibernate Training Institutes in Chennai Hibernate Online Training Hibernate Online Training Hibernate Training in Chennai Hibernate Training in Chennai Java Online Training Java Online Training

    ReplyDelete