[conluz-70] Configured SSL. Created keystore. Added www.omie.es certificate in the keystore #71
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Solution
Generated keystore
Generated file
conluz.p12
using the command:keytool -genkeypair -alias conluz -keyalg RSA -keysize 2048 -storetype PKCS12 -keystore conluz.p12 -validity 3650
Configured app to run with self signed SSL certificate
Modified file application.properties with the following:
Added www.omie.es certificate in the keystore
Generated the www.omie.es certificate file
omie.pem
with the command:echo | openssl s_client -servername www.omie.es -connect www.omie.es:443 2>/dev/null | openssl x509 > omie.pem
Next, import this certificate into your keystore using the keytool:
keytool -import -alias omie -keystore conluz.p12 -file omie.pem
Increase timeout when calling to www.omie.es to 30 seconds
By default, the timeout is 10 seconds, and the call to https://www.omie.es/es/file-download fails.