OpenSSL in UBUNTU Linux February 28, 2009
Posted by suhaskaundinya in Life at Columbia University.Tags: Linux, ubuntu, OpenSSL, certificates, CA, SSL, TLS
trackback
OpenSSL is an open source implementation of the SSL and TLS protocols. The core library (written in the C programming language) implements the basic cryptographic functions and provides various utility functions. [wikipedia]
OpenSSL is provided by default in all linux installations to implement the Secure Socket Layer operations. Using OpenSSL you can establish your own certifying authority and generate and sign server side and client side certificates. More information about the OpenSSL project can be found here : The OpenSSL Project.
Establishing a certifying authority and generating certificates in an UBUNTU linux installation is particularly easy :
- #apt-cache search libssl | grep SSL
- #cd && mkdir -p myCA/signedcerts && mkdir myCA/private && cd myCA
- #echo ’01′ > serial && touch index.txt
- Create an initial caconfig.cnf file suitable for the creation of CA certificates (refer link below)
- #export OPENSSL_CONF=~/myCA/caconfig.cnf
- #openssl req -x509 -newkey rsa:2048 -out cacert.pem -outform PEM -days 1825
- #export OPENSSL_CONF=~/myCA/exampleserver.cnf
- #openssl req -newkey rsa:1024 -keyout tempkey.pem -keyform PEM -out tempreq.pem -outform PEM
- #openssl rsa < tempkey.pem > server_key.pem
- #mv tempkey.pem server_key.pem
- #export OPENSSL_CONF=~/myCA/caconfig.cnf
- #openssl ca -in tempreq.pem -out server_crt.pem
- #rm -f tempkey.pem && rm -f tempreq.pem
The above 13 commands create a CA – create a server certificate and also sign it. For a much detailed and informative tutorial refer : https://help.ubuntu.com/community/OpenSSL
The above process can also be automated using the CA.pl script which comes with the library — this post will be helpful for those who want to know what goes on inside the script.












Comments»
No comments yet — be the first.