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

feat: add SSL configuration options #114

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Classes/Transfer/RequestService.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,23 @@ public function initializeObject()
$requestEngine->setOption(CURLOPT_TIMEOUT, $this->settings['transfer']['connectionTimeout']);
$requestEngine->setOption(CURLOPT_SSL_VERIFYPEER, $this->settings['transfer']['sslVerifyPeer'] ?? true ? 2 : 0);
$requestEngine->setOption(CURLOPT_SSL_VERIFYHOST, $this->settings['transfer']['sslVerifyHost'] ?? true ? 2 : 0);

if (!empty($this->settings['transfer']['sslCaInfo'])) {
$requestEngine->setOption(CURLOPT_CAINFO, $this->settings['transfer']['sslCaInfo']);
}

if (!empty($this->settings['transfer']['sslKey'])) {
$requestEngine->setOption(CURLOPT_SSLKEY, $this->settings['transfer']['sslKey']);
}

if (!empty($this->settings['transfer']['sslCert'])) {
$requestEngine->setOption(CURLOPT_SSLCERT, $this->settings['transfer']['sslCert']);
}

if (!empty($this->settings['transfer']['sslKeyPasswd'])) {
$requestEngine->setOption(CURLOPT_SSLKEYPASSWD, $this->settings['transfer']['sslKeyPasswd']);
}

$this->browser->setRequestEngine($requestEngine);
}

Expand Down
4 changes: 4 additions & 0 deletions Configuration/Settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ Flowpack:
connectionTimeout: 60
sslVerifyPeer: true
sslVerifyHost: true
sslCaInfo: ''
sslCert: ''
sslKey: ''
sslKeyPasswd: ''
Neos:
Flow:
persistence:
Expand Down
17 changes: 17 additions & 0 deletions Documentation/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,23 @@ and password in your client settings::
username: john
password: mysecretpassword

The following options are available to configure TLS connections. These correspond to the options provided by cURL::

sslVerifyHost: true
sslVerifyPeer: true

# CA certificate to verify the peer with
sslCaInfo: './root-ca.pem'

# file containing the private SSL key
sslKey: './client-key.pem'

# file containing the PEM formatted certificate
sslCert: './client.pem'

# password needed for the private SSL key
sslKeyPasswd: 'some-password'

Running the Functional Tests
============================

Expand Down