First do the below change in hosts file as follows
#127.0.0.1 localhost
127.0.1.1 priyan-pc
127.0.0.1 local.wso2telco.com
#10.10.12.59 local.wso2telco.com
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
~
"/etc/hosts"
openssl req -x509 -nodes -days 20 -newkey rsa:2048 -keyout wso2telco.key -out wso2telco.crt
priyan@priyan-pc ~/wso2carbon/wso2telcohub-3.0.3-SNAPSHOT/repository/resources/security $ openssl req -x509 -nodes -days 20 -newkey rsa:2048 -keyout wso2telco.key -out wso2telco.crt
Generating a 2048 bit RSA private key
........................................................................+++
................................................................+++
writing new private key to 'wso2telco.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:SL
State or Province Name (full name) [Some-State]:WESTERN
Locality Name (eg, city) []:COLOMBO
Organization Name (eg, company) [Internet Widgits Pty Ltd]:WSO2TELCO
Organizational Unit Name (eg, section) []:IT
Common Name (e.g. server FQDN or YOUR name) []:*.wso2telco.com
Email Address []:support@wso2telco.com
openssl pkcs12 -export -in wso2telco.crt -inkey wso2telco.key -name "wso2carbon" -out wso2telco.pfx
password : wso2carbon
keytool -importkeystore -srckeystore wso2telco.pfx -srcstoretype pkcs12 -destkeystore wso2carbon.jks -deststoretype JKS
keytool -export -alias wso2carbon -keystore wso2carbon.jks -file wso2telco.pem
keytool -import -alias wso2carbon -file wso2telco.pem -keystore client-truststore.jks
if alredy exsists::::::::::::[keytool error: java.lang.Exception: Certificate not imported, alias <wso2carbon> already exists]
Solution : keytool -delete -alias wso2carbon -keystore client-truststore.jks -storepass wso2carbon
#127.0.0.1 localhost
127.0.1.1 priyan-pc
127.0.0.1 local.wso2telco.com
#10.10.12.59 local.wso2telco.com
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
~
"/etc/hosts"
openssl req -x509 -nodes -days 20 -newkey rsa:2048 -keyout wso2telco.key -out wso2telco.crt
priyan@priyan-pc ~/wso2carbon/wso2telcohub-3.0.3-SNAPSHOT/repository/resources/security $ openssl req -x509 -nodes -days 20 -newkey rsa:2048 -keyout wso2telco.key -out wso2telco.crt
Generating a 2048 bit RSA private key
........................................................................+++
................................................................+++
writing new private key to 'wso2telco.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:SL
State or Province Name (full name) [Some-State]:WESTERN
Locality Name (eg, city) []:COLOMBO
Organization Name (eg, company) [Internet Widgits Pty Ltd]:WSO2TELCO
Organizational Unit Name (eg, section) []:IT
Common Name (e.g. server FQDN or YOUR name) []:*.wso2telco.com
Email Address []:support@wso2telco.com
openssl pkcs12 -export -in wso2telco.crt -inkey wso2telco.key -name "wso2carbon" -out wso2telco.pfx
password : wso2carbon
keytool -importkeystore -srckeystore wso2telco.pfx -srcstoretype pkcs12 -destkeystore wso2carbon.jks -deststoretype JKS
keytool -export -alias wso2carbon -keystore wso2carbon.jks -file wso2telco.pem
keytool -import -alias wso2carbon -file wso2telco.pem -keystore client-truststore.jks
if alredy exsists::::::::::::[keytool error: java.lang.Exception: Certificate not imported, alias <wso2carbon> already exists]
Solution : keytool -delete -alias wso2carbon -keystore client-truststore.jks -storepass wso2carbon