dev/core#1137 - Make ssl database connections without client certificates work in php7 #298
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.
https://lab.civicrm.org/dev/core/-/issues/1137. Also related to civicrm/civicrm-core#17694 and I did some more investigating.
ca=true
and mysqli_ssl_set and mysqli_real_connect will work without requiring client certificates.ca
to an actual ca file (and use the correct hostname in real_connect) then it will work.In either case in php7 note that it will be picky about the hostname you use in real_connect - it needs to match the cert used by the server.
So I see no reason not to set the CLIENT_SSL flag in this block (which only executes when you specify you want ssl) since then you have the choice of no client certificate (which will be the most common scenario), or you can choose to use certificates. My guess on why pear::DB does not set this is because it's from php5.
There is still more needed - see 17694 - but this will allow using without client certificates.
@seamuslee001