Skip to content

Commit

Permalink
feat: add SSL configuration options
Browse files Browse the repository at this point in the history
  • Loading branch information
cvette committed Mar 24, 2024
1 parent 7a8a85f commit a2f43a5
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Classes/Transfer/RequestService.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ 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);

$requestEngine->setOption(CURLOPT_CAINFO, $this->settings['transfer']['sslCaInfo'] ?? '');
$requestEngine->setOption(CURLOPT_SSLKEY, $this->settings['transfer']['sslKey'] ?? '');
$requestEngine->setOption(CURLOPT_SSLCERT, $this->settings['transfer']['sslCert'] ?? '');
$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

0 comments on commit a2f43a5

Please sign in to comment.