generate csr from existing certificate -openssl code example
Example 1: or create a self signed certificate openssl in csr
openssl x509 -req -days 365 -in rootca.csr -signkey rootca.key -out rootca.crt
Example 2: or create a self signed certificate openssl in csr
openssl req -new > cert.csr
openssl rsa -in privkey.pem -out key.pem
openssl x509 -in cert.csr -out cert.pem -req -signkey key.pem -days 1001
cat key.pem>>cert.pem