TO create a new signing request using openssl the command used is.
openssl req -new -newkey rsa:2048 -nodes -keyout ssl.key -out ssl.csr
then using the .csr certificate been created.
2. To list all the certificates
keytool -list -cacerts
3.To print cert file which has .cer extension use the tool named keytool
keytool -printcert -file <ssl.cer>
4. To import the keys
keytool -import -keystore /tmp/sonar-scanner/jre/lib/security/cacerts -file /tmp/sonar.cer -alias sonar
5. To view the keydetails in cacerts path with alias name
keytool -v -list -keystore /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/cacerts -alias sonar_new_key
6.Then we need to paste cert file(.cer) in path
/etc/pki/tls/certs
7.Next we need to keep the private keyfile(.key) on
/etc/pki/tls/private
8. then we need to make the changes on server.
for apache /etc/httpd/conf.d
under server certificate add this value
SSLCertificateFile /etc/pki/tls/certs/sonar.cer
under server private key add this value
SSLCertificateKeyFile /etc/pki/tls/private/sonar.key