Cassandra\SSLOptions builder allows fluent configuration of ssl options.

See Also:

Methods

SSLOptions\Builder

withTrustedCerts

( string $path )

Adds a trusted certificate. This is used to verify node’s identity.

Parameters:
Name Type Details
$path string

one or more paths to files containing a PEM formatted certificate.

Throws:
Type Details
Exception\InvalidArgumentException
Returns:
Type Details
SSLOptions\Builder

self

SSLOptions\Builder

withVerifyFlags

( int $flags )

Disable certificate verification.

Parameters:
Name Type Details
$flags int
Throws:
Type Details
Exception\InvalidArgumentException
Returns:
Type Details
SSLOptions\Builder

self

SSLOptions\Builder

withClientCert

( string $path )

Cassandra\Set client-side certificate chain.

This is used to authenticate the client on the server-side. This should contain the entire Certificate chain starting with the certificate itself.

Parameters:
Name Type Details
$path string

path to a file containing a PEM formatted certificate.

Throws:
Type Details
Exception\InvalidArgumentException
Returns:
Type Details
SSLOptions\Builder

self

SSLOptions\Builder

withPrivateKey

( string $path, string $passphrase = null )

Cassandra\Set client-side private key. This is used to authenticate the client on the server-side.

Parameters:
Name Type Details
$path string

Path to the private key file

$passphrase string

Passphrase for the private key, if any

Throws:
Type Details
Exception\InvalidArgumentException
Returns:
Type Details
SSLOptions\Builder

self

Builds SSL options.

Returns:
Type Details
Cassandra\SSLOptions

ssl options configured accordingly.