Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[conluz-70] Configured SSL. Created keystore. Added www.omie.es certificate in the keystore #71

Merged
merged 2 commits into from
Apr 17, 2024

Conversation

viktorKhan
Copy link
Contributor

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:

server.port=8443
server.ssl.enabled=true
server.ssl.key-store-type=PKCS12
server.ssl.key-store=classpath:keystore/conluz.p12
server.ssl.key-store-password=changeit
server.ssl.key-alias=conluz

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.

@viktorKhan viktorKhan self-assigned this Apr 17, 2024
@viktorKhan viktorKhan linked an issue Apr 17, 2024 that may be closed by this pull request
@viktorKhan viktorKhan merged commit 5eca2d3 into main Apr 17, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error synchronizeing OMIE prices
1 participant