Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
395805e5
Unverified
Commit
395805e5
authored
Nov 19, 2017
by
Luís Cobucci
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/#2815-mysqli-ssl-key-should-not-be-reqd' into 2.6
Backporting:
https://github.com/doctrine/dbal/pull/2816
parents
c6785e34
5de45aac
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
38 deletions
+4
-38
MysqliConnection.php
lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php
+2
-7
MysqliConnectionTest.php
...octrine/Tests/DBAL/Driver/Mysqli/MysqliConnectionTest.php
+0
-29
install-mysql-5.7.sh
tests/travis/install-mysql-5.7.sh
+2
-2
No files found.
lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php
View file @
395805e5
...
@@ -281,14 +281,9 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
...
@@ -281,14 +281,9 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
return
;
return
;
}
}
if
(
!
isset
(
$params
[
'ssl_key'
])
||
!
isset
(
$params
[
'ssl_cert'
]))
{
$msg
=
'"ssl_key" and "ssl_cert" parameters are mandatory when using secure connection parameters.'
;
throw
new
MysqliException
(
$msg
);
}
$this
->
_conn
->
ssl_set
(
$this
->
_conn
->
ssl_set
(
$params
[
'ssl_key'
],
$params
[
'ssl_key'
]
??
null
,
$params
[
'ssl_cert'
],
$params
[
'ssl_cert'
]
??
null
,
$params
[
'ssl_ca'
]
??
null
,
$params
[
'ssl_ca'
]
??
null
,
$params
[
'ssl_capath'
]
??
null
,
$params
[
'ssl_capath'
]
??
null
,
$params
[
'ssl_cipher'
]
??
null
$params
[
'ssl_cipher'
]
??
null
...
...
tests/Doctrine/Tests/DBAL/Driver/Mysqli/MysqliConnectionTest.php
View file @
395805e5
...
@@ -50,34 +50,5 @@ class MysqliConnectionTest extends DbalTestCase
...
@@ -50,34 +50,5 @@ class MysqliConnectionTest extends DbalTestCase
restore_error_handler
();
restore_error_handler
();
}
}
/**
* @dataProvider secureMissingParamsProvider
*/
public
function
testThrowsExceptionWhenMissingMandatorySecureParams
(
array
$secureParams
)
{
$this
->
expectException
(
MysqliException
::
class
);
$msg
=
'"ssl_key" and "ssl_cert" parameters are mandatory when using secure connection parameters.'
;
$this
->
expectExceptionMessage
(
$msg
);
new
MysqliConnection
(
$secureParams
,
'xxx'
,
'xxx'
);
}
public
function
secureMissingParamsProvider
()
{
return
[
[
[
'ssl_cert'
=>
'cert.pem'
]
],
[
[
'ssl_key'
=>
'key.pem'
]
],
[
[
'ssl_key'
=>
'key.pem'
,
'ssl_ca'
=>
'ca.pem'
,
'ssl_capath'
=>
'xxx'
,
'ssl_cipher'
=>
'xxx'
]
],
[
[
'ssl_ca'
=>
'ca.pem'
,
'ssl_capath'
=>
'xxx'
,
'ssl_cipher'
=>
'xxx'
]
]
];
}
}
}
tests/travis/install-mysql-5.7.sh
View file @
395805e5
...
@@ -9,8 +9,8 @@ sudo apt-get remove "^mysql.*"
...
@@ -9,8 +9,8 @@ sudo apt-get remove "^mysql.*"
sudo
apt-get autoremove
sudo
apt-get autoremove
sudo
apt-get autoclean
sudo
apt-get autoclean
echo
mysql-apt-config mysql-apt-config/select-server
select
mysql-5.7 |
sudo
debconf-set-selections
echo
mysql-apt-config mysql-apt-config/select-server
select
mysql-5.7 |
sudo
debconf-set-selections
wget http://dev.mysql.com/get/mysql-apt-config_0.8.
6
-1_all.deb
wget http://dev.mysql.com/get/mysql-apt-config_0.8.
9
-1_all.deb
sudo
DEBIAN_FRONTEND
=
noninteractive dpkg
-i
mysql-apt-config_0.8.
6
-1_all.deb
sudo
DEBIAN_FRONTEND
=
noninteractive dpkg
-i
mysql-apt-config_0.8.
9
-1_all.deb
sudo rm
-rf
/var/lib/apt/lists/
*
sudo rm
-rf
/var/lib/apt/lists/
*
sudo
apt-get clean
sudo
apt-get clean
sudo
apt-get update
-q
sudo
apt-get update
-q
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment