Skip to content

Commit

Permalink
Try copying certificates and keys instead of mounting a volume
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Aug 18, 2020
1 parent ece16a6 commit e89622d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion tests/travis/docker-run-mysql-or-mariadb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ docker run \
--detach \
--env MYSQL_ALLOW_EMPTY_PASSWORD=yes \
--env MYSQL_DATABASE=doctrine_tests \
--volume /tmp/mysql:/var/lib/mysql \
--publish 33306:3306 \
--name rdbms \
"$IMAGE" $CMD_OPTIONS
Expand All @@ -41,3 +40,8 @@ while true; do
;;
esac
done

for i in "ca.pem" "client-cert.pem" "client-key.pem"
do
docker cp "rdbms:/var/lib/mysql/$i" .
done
6 changes: 3 additions & 3 deletions tests/travis/mysqli-tls.docker.travis.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
<var name="db_driver" value="mysqli"/>
<var name="db_host" value="127.0.0.1"/>
<var name="db_port" value="33306"/>
<var name="db_ssl_ca" value="/tmp/mysql/ca.pem"/>
<var name="db_ssl_cert" value="/tmp/mysql/client-cert.pem"/>
<var name="db_ssl_key" value="/tmp/mysql/client-key.pem"/>
<var name="db_ssl_ca" value="ca.pem"/>
<var name="db_ssl_cert" value="client-cert.pem"/>
<var name="db_ssl_key" value="client-key.pem"/>

<!-- Use MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT since there's no way to generate a certificate
with a proper common name (CN) on Travis. This flag must be not used in production settings. -->
Expand Down

0 comments on commit e89622d

Please sign in to comment.