-
Notifications
You must be signed in to change notification settings - Fork 2
Developer Workspace
Stefan Bechtold edited this page Feb 3, 2023
·
1 revision
- Create a keystore directory within your config folder
cd <YOUR WORKSPACE DIR>
cd core-customize/hybris/config
mkdir keystore
cd keystore
- Create key and rsa request combination for localhost (if you need another name, change the CN variable below)
openssl genrsa -out localhost.key 2048
openssl rsa -in localhost.key -out localhost.key.rsa
openssl req -new -key localhost.key.rsa -subj /CN=localhost -out localhost.csr -config localhost.conf
- Set the certificate to expire in 10 years (3650 days).
openssl x509 -req -extensions v3_req -days 3650 -in localhost.csr -signkey localhost.key.rsa -out localhost.crt -extfile localhost.conf
- Convert to PKCS12 format
openssl pkcs12 -export -in localhost.crt -inkey localhost.key -name localhost -out localhost.p12
- Create new Java keystore and import certificate (use 123456 as keystore password)
keytool -importkeystore -destkeystore localhost.keystore -srckeystore localhost.p12 -srcstoretype PKCS12
keytool -import -alias localhost -trustcacerts -file localhost.crt -keystore localhost.keystore
- Add to trusted store (Mac Only)
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain localhost.crt
- Add the configuration to local.properties
# Keystore setup to avoid SSL errors (use your own password if necessary)
tomcat.ssl.keystore.path=${HYBRIS_CONFIG_DIR}/keystore/localhost.keystore
tomcat.ssl.keystore.password=123456
tomcat.ssl.keystore.alias=developer