Introduction
This article demonstrate the procedures using openssl to generate self-signed certificates, and how to use the private key to configure HTTPS connector.Generate Private Key And Public Cert Using openssl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | $ openssl req -newkey rsa:2048 -x509 -keyout cakey.pem -out cacert.pem -days 3650 Generating a RSA private key ....+++++ ...................................................+++++ writing new private key to 'cakey.pem' Enter PEM pass phrase: Verifying - Enter PEM pass phrase: ----- 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) [XX]:US State or Province Name (full name) []:Texas Locality Name (eg, city) [Default City]:Dallas Organization Name (eg, company) [Default Company Ltd]:GGL Consulting Inc Organizational Unit Name (eg, section) []:EA Common Name (eg, your name or your server's hostname ) []:Gary Liu Email Address []:gary.liu1119@gmail.com |
- cakey.pem
- cacert.pem
- JKS -- Java Keystore
- PKCS12 -- for details refer this page
- JCEKS -- Stands for Java Cryptography Extension KeyStore
1 2 3 4 | $ openssl pkcs12 - export - in cacert.pem -inkey cakey.pem -out identity.p12 -name "mykey" Enter pass phrase for cakey.pem: Enter Export Password: Verifying - Enter Export Password: |
Configure HTTPS Connector
The xml configuration will be like the following:1 2 3 4 5 6 | < http:listener-connection protocol = "HTTPS" host = "0.0.0.0" port = "443" > < tls:context > < tls:key-store type = "pkcs12" path = "identity.p12" alias = "mykey" keypassword = "gary" password = "gary" > </ tls:key-store ></ tls:context > </ http:listener-connection > |
Invoke The Service
To test the service we can use the following curl command:1 2 3 4 5 6 7 | $ curl -k -XGET https: //localhost/helloworld % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 31 100 31 0 0 31 0 0:00:01 0:00:01 --:--:-- 29 { "message" : "Hello, World" } |
very nice & informative video for mulesoft folks...you can also visit https://www.goformule.com for mulesoft tutorials
ReplyDeleteVery informative post for mulesoft developers.You can also visit goformule.com for mulesoft stuff.
ReplyDeleteThank you so much for these kinds of informative blogs.We are also a digital marketing company in gurgaon and we provide the website design services,
ReplyDeleteweb development services, e-commerce development services.
website designer in noida
website designers delhi
website designers in delhi
website designing agency in delhi
website designing and development
website designing companies in delhi
website designing company delhi
website designing company in delhi ncr
website designing company in gurgaon
website designing company in new delhi
website designing company in noida
website designing company list
website designing company noida
website designing cost in delhi
website designing cost in india
website designing delhi
website designing firms in delhi
website designing in delhi
website designing in delhi ncr
website designing in gurgaon
website designing in noida
website designing services
website designing services delhi
website designing services in delhi
web design development company
web design development services
web design in delhi
web design service
web design services company
web design services in delhi
web designer company
web designer delhi
web designer in delhi
web designers delhi
web designers in delhi
web designing & development
web designing advertisement
web designing and development
web designing and development company
web designing and development services
This blog is very enjoyable and very informative. Thank you for sharing this nice article.
ReplyDeleteMulesoft Online Training
Mulesoft Training in Hyderabad
Thanks for sharing valuable information and very well explained. Keep posting.
ReplyDeletemule 4 online training
mule 4 certification