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

Add Support for MySQL SSL connections #415

Closed
colinmo opened this issue Apr 9, 2018 · 2 comments
Closed

Add Support for MySQL SSL connections #415

colinmo opened this issue Apr 9, 2018 · 2 comments
Labels
enhancement mysqli MySQL and compatible drivers (MariaDB, etc) (Tier 1)
Milestone

Comments

@colinmo
Copy link
Contributor

colinmo commented Apr 9, 2018

MySQL has the ability to have secured connections via a certificate. This is quite simple in Azure to configure. However ADODB's connect function inits-and-connects in one fell swoop, and the SSL trigger needs to happen between the two if it's not part of the my.cnf. I'd like to propose an extension to the adodb-mysqli.inc.php code:

class ADODB_mysqli extends ADOConnection { ... var $multiQuery = false; var $ssl_key = false; var $ssl_cer = false; var $ssl_ca = false; var $ssl_capath = false; var $ssl_cipher = false;
...
if ($persist && PHP_VERSION > 5.2 && strncmp($argHostname,'p:',2) != 0) $argHostname = 'p:'.$argHostname; if ($this->ssl_key || $this->ssl_cer || $this->ssl_ca || $this->ssl_ccapath || $this->ca_cipher) { mysqli_ssl_set($this->_connectionID, $this->ssl_key, $this->ssl_cer, $this->ssl_ca, $this->ssl_capath, $this->ssl_cipher); }

@Mike-Benoit
Copy link
Contributor

Can you please submit it as a pull request so it's easier to review?

@colinmo
Copy link
Contributor Author

colinmo commented Apr 9, 2018

My apologies, will do. Now in place as pull request #416

@dregad dregad closed this as completed Apr 9, 2018
@mnewnham mnewnham added mysqli MySQL and compatible drivers (MariaDB, etc) (Tier 1) enhancement labels Dec 13, 2020
@mnewnham mnewnham added this to the 5.20.19 milestone Dec 13, 2020
@mnewnham mnewnham changed the title SSL for mysqli connections Add Support for MySQL SSL connections Dec 14, 2020
@dregad dregad modified the milestones: 5.20.19, v5.21.0 Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement mysqli MySQL and compatible drivers (MariaDB, etc) (Tier 1)
Projects
None yet
Development

No branches or pull requests

4 participants