1) ที่ Linux
#yum install mod_ssl เพื่อที่จะได้คำสั่ง openssl
แบบ Self-Signed
=============
2)Create a RSA private key for your server (will be Triple-DES encrypted and PEM formatted):
$ openssl genrsa -des3 -out server.key 1024
3) Create a self-signed Certificate (X509 structure) with the RSA key you just created (output will be PEM formatted):
$ openssl req -new -x509 -nodes -sha1 -days 365 -key server.key -out server.crt
*****จากนั้นนำ server.key กับ server.crt ไปใช้งาน โดยระบุใน apache configuration file (ssl.conf)
แบบส่ง Public key ไป Sign กับ ROOT CA (cacert.org)
===========================
2) Create a RSA private key for your Apache server (will be Triple-DES encrypted and PEM formatted):
$ openssl genrsa -des3 -out server.key 1024
3) Create a Certificate Signing Request (CSR) with the server RSA private key (output will be PEM formatted):
$ openssl req -new -key server.key -out server.csr
เมื่อได้ไฟล์ server.csr แล้วจึงนำไปสร้าง Certificate ที่ website cacert.org จะได้เนื้อหาของไฟล์ server.crt
****จากนั้นนำ server.key กับ server.crt ไปใช้งาน โดยระบุใน apache configuration file (ssl.conf)
****ข้อจำกัดคือจะได้ Certificate ที่มีอายุเพียง 6 เดือน
อ้างอิง
http://httpd.apache.org/docs/2.0/ssl/ssl_faq.html
http://www.cacert.org
