PHP Class Cassandra\SSLOptions\Builder

See also: Cassandra::ssl()
See also: Cassandra\Cluster\Builder::withSSL()
Datei anzeigen Open project: datastax/php-driver

Public Methods

Method Description
build ( ) : Cassandra\SSLOptions Builds SSL options.
withClientCert ( string $path ) : Builder Set client-side certificate chain.
withPrivateKey ( string $path, string | null $passphrase = null ) : Builder Set client-side private key. This is used to authenticate the client on the server-side.
withTrustedCerts ( $path ) : Builder Adds a trusted certificate. This is used to verify node's identity.
withVerifyFlags ( integer $flags ) : Builder Disable certificate verification.

Method Details

build() public method

Builds SSL options.
public build ( ) : Cassandra\SSLOptions
return Cassandra\SSLOptions ssl options configured accordingly.

withClientCert() public method

This is used to authenticate the client on the server-side. This should contain the entire Certificate chain starting with the certificate itself.
public withClientCert ( string $path ) : Builder
$path string path to a file containing a PEM formatted certificate.
return Builder self

withPrivateKey() public method

Set client-side private key. This is used to authenticate the client on the server-side.
public withPrivateKey ( string $path, string | null $passphrase = null ) : Builder
$path string Path to the private key file
$passphrase string | null Passphrase for the private key, if any
return Builder self

withTrustedCerts() public method

Adds a trusted certificate. This is used to verify node's identity.
public withTrustedCerts ( $path ) : Builder
return Builder self

withVerifyFlags() public method

Disable certificate verification.
public withVerifyFlags ( integer $flags ) : Builder
$flags integer
return Builder self