-
Notifications
You must be signed in to change notification settings - Fork 5
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
TLS connection certificate failure, certificate instructions? #5
Comments
Checking a bit further:
php 5.4.16 centos7.5 (working with airavata)
|
php 7.2.24 centos8.3, running:
results in
which are supposedly used when php 7.2.24's openssl.cafile & .cpath are null Those paths seem to have certificates:
|
@ehb54 I've attached the certificate for api.scigap.org |
Here's how I generated it, FYI:
|
I noticed though that our self-signed certificate is long since expired. So even with trusting it, I doubt it will successfully verify. |
[fyi - the following tests were done on demeler9, not uslims4.aucsolutions] Ah yes, I have been unable to get this to work with fsockopen()
& verified there subsequently is a new entry in /etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt & indeed there is:
fsockopen() still failed, likely due to the expiration. It turns out that fsockopen() does not allow turning off cert verify, but this alternative does:
And does return true.
Might be differences in exception handling, didn't check. OTOH, there are only 2 places in the code where fsockopen seems to be used
so it seems to be a simple change we could test. |
Thank you Emre for these extra tests, yaa we need to stick to fsock, I will see if we can update our certs |
@ehb54 I think we will try to update the server certs with letsencrypt following these instructions, that should mitigate any need of extra steps, we will update you what we find - https://ordina-jworks.github.io/security/2019/08/14/Using-Lets-Encrypt-Certificates-In-Java.html |
@ehb54 following instructions at https://blog.keychest.net/lets-encrypt-certificate-into-java-jks I was able to use a letsencrypt certificate and fsocek now verifies correctly. |
@smarru Yes, I was able to connect from both demeler9 & uslims4 :) |
@smarru will you setup an automated renewal of the certs? |
@ehb54 thats my next worry on how to renew, we brainstormed some thoughts but did not converge. Letsencrypt renewal is trivial and so is java store creation. The challenge is to come up with a way so we don't have to restrat Airavata API server. So we have 90 days to put a automated renewal in place |
Certs seem expired again :( |
Emre, can you please try now |
Trying to connect, we get a certificate issue
Code:
Result (php 7.2.24 centos 8.3):
Result (php 5.4.16 centos 7.5)
Are there instructions for certificate setup?
Thanks,
Emre
The text was updated successfully, but these errors were encountered: