$ su
$ ./CA.pl -newca, follow the steps to generate certificate in ./demoCA directory
$ cd /demoCA
$ openssl x509 -outform der -in cacert.pem -out cacert.crt => This CA certificate can be installed in devices.
** 2. Generate server side certificate
$ openssl req -new -nodes -keyout srv_key.pem -out srv_req.pem -config ../openssl.cnf