# SslOptions

<div class="jsdoc-content"><header>
    
        <h2><span class="attribs"><span class="type-signature"></span></span>SslOptions<span class="signature">()</span><span class="type-signature"></span></h2>
        
            <div class="class-description"><p>SSL/TLS options for secure connections.
Based on Node.js tls.ConnectionOptions which extends SecureContextOptions and CommonConnectionOptions.</p></div>
        
    
</header>


    
        

    
    </div>

## Constructor

<div class="jsdoc-content">
    

    
    <h4 class="name" id="SslOptions"><span class="type-signature"></span>new SslOptions<span class="signature">()</span><span class="type-signature"></span></h4>
    

    















<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/client-options.ts#L502" target="_blank" rel="noopener">client-options.ts, line 502</a></p></div>




















    
    

    

    

    

    

    

    

    
        </div>

## Members

<div class="jsdoc-content">

        
            
<h4 class="name" id="ca"><span class="type-signature"></span>ca<span class="type-signature"></span></h4>




<div class="description">
    <p>Optionally override the trusted CA certificates. When not provided,
uses OpenSSL defaults (which in most cases means system trusted certificates).
Setting this option replaces the default CA certificates, rather than adding to them.</p>
<p>Corresponds to <a href="https://docs.openssl.org/master/man3/SSL_CTX_set_cert_store/">SSL_CTX_set_cert_store</a></p>
<p><strong>Warning:</strong> Behavior when this option is unset differs from Node.js defaults.</p>
</div>







<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/client-options.ts#L515" target="_blank" rel="noopener">client-options.ts, line 515</a></p></div>






        
            
<h4 class="name" id="cert"><span class="type-signature"></span>cert<span class="type-signature"></span></h4>




<div class="description">
    <p>Cert chains in PEM format. One cert chain should be provided per private key.
Each cert chain should consist of the PEM formatted certificate for a provided
private key, followed by the PEM formatted intermediate certificates (if any),
in order, and not including the root CA (the root CA must be pre-known to the peer,
see ca). If the intermediate certificates are not provided, the peer will not be
able to validate the certificate, and the handshake will fail.</p>
<p>Only a single cert chain is currently supported by the driver.</p>
<p>Corresponds to <a href="https://docs.openssl.org/master/man3/SSL_CTX_use_certificate/">SSL_CTX_use_certificate</a>
for the first certificate in the chain and
<a href="https://docs.openssl.org/master/man3/SSL_CTX_add_extra_chain_cert/">SSL_CTX_add_extra_chain_cert</a>
for the subsequent certificates in the chain.</p>
</div>







<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/client-options.ts#L532" target="_blank" rel="noopener">client-options.ts, line 532</a></p></div>






        
            
<h4 class="name" id="ciphers"><span class="type-signature"></span>ciphers<span class="type-signature"></span></h4>




<div class="description">
    <p>Cipher suite specification, replacing the default.
For more information, see modifying the default cipher suite.
Permitted ciphers can be obtained via tls.getCiphers().
Cipher names must be uppercased in order for OpenSSL to accept them.</p>
<p>Corresponds to <a href="https://docs.openssl.org/master/man3/SSL_CTX_set_cipher_list/">SSL_set_ciphersuites</a> for ciphers with <code>TLS_</code> prefix <a href="https://docs.openssl.org/master/man3/SSL_CTX_set_cipher_list/">SSL_CTX_set_cipher_list</a> for remaining ciphers.</p>
</div>







<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/client-options.ts#L552" target="_blank" rel="noopener">client-options.ts, line 552</a></p></div>






        
            
<h4 class="name" id="ecdhCurve"><span class="type-signature"></span>ecdhCurve<span class="type-signature"></span></h4>




<div class="description">
    <p>A string describing a named curve or a colon separated list of curve
NIDs or names, for example P-521:P-384:P-256, to use for ECDH key
agreement. Set to auto to select the curve automatically. Use
crypto.getCurves() to obtain a list of available curve names. On
recent releases, openssl ecparam -list_curves will also display the
name and description of each available elliptic curve. Default:
tls.DEFAULT_ECDH_CURVE.</p>
<p>corresponds to <a href="https://docs.openssl.org/master/man3/SSL_CTX_set1_curves/">SSL_CTX_set1_curves</a></p>
</div>







<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/client-options.ts#L565" target="_blank" rel="noopener">client-options.ts, line 565</a></p></div>






        
            
<h4 class="name" id="honorCipherOrder"><span class="type-signature"></span>honorCipherOrder<span class="type-signature"></span></h4>




<div class="description">
    <p>Attempt to use the server's cipher suite preferences instead of the client's.
When true, causes SSL_OP_CIPHER_SERVER_PREFERENCE to be set in secureOptions.</p>
</div>







<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/client-options.ts#L571" target="_blank" rel="noopener">client-options.ts, line 571</a></p></div>






        
            
<h4 class="name" id="key"><span class="type-signature"></span>key<span class="type-signature"></span></h4>




<div class="description">
    <p>Private keys in PEM format. PEM allows the option of private keys being encrypted.
Encrypted keys will be decrypted with options.passphrase.</p>
<p>Only a single cert chain, and as a result a single private key
is currently supported by the driver.</p>
<p>Corresponds to <a href="https://docs.openssl.org/master/man3/SSL_CTX_use_PrivateKey/">SSL_CTX_use_PrivateKey</a></p>
</div>







<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/client-options.ts#L582" target="_blank" rel="noopener">client-options.ts, line 582</a></p></div>






        
            
<h4 class="name" id="maxVersion"><span class="type-signature"></span>maxVersion<span class="type-signature"></span></h4>




<div class="description">
    <p>Optionally set the maximum TLS version to allow. One
of <code>'TLSv1.3'</code>, <code>'TLSv1.2'</code>, <code>'TLSv1.1'</code>, or <code>'TLSv1'</code>.</p>
<p><strong>Default:</strong> <code>'TLSv1.3'</code></p>
<p><strong>Warning:</strong> In Node.js it was possible to modify default values using CLI options.
This is not possible here.</p>
</div>







<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/client-options.ts#L593" target="_blank" rel="noopener">client-options.ts, line 593</a></p></div>






        
            
<h4 class="name" id="minVersion"><span class="type-signature"></span>minVersion<span class="type-signature"></span></h4>




<div class="description">
    <p>Optionally set the minimum TLS version to allow. One
of <code>'TLSv1.3'</code>, <code>'TLSv1.2'</code>, <code>'TLSv1.1'</code>, or <code>'TLSv1'</code>. It is not recommended to use
less than TLSv1.2, but it may be required for interoperability.</p>
<p><strong>Default:</strong> <code>'TLSv1.2'</code></p>
<p><strong>Warning:</strong> In Node.js it was possible to modify default values using CLI options.</p>
</div>







<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/client-options.ts#L604" target="_blank" rel="noopener">client-options.ts, line 604</a></p></div>






        
            
<h4 class="name" id="passphrase"><span class="type-signature"></span>passphrase<span class="type-signature"></span></h4>




<div class="description">
    <p>Shared passphrase used for a single private key and/or a PFX.</p>
</div>







<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/client-options.ts#L609" target="_blank" rel="noopener">client-options.ts, line 609</a></p></div>






        
            
<h4 class="name" id="pfx"><span class="type-signature"></span>pfx<span class="type-signature"></span></h4>




<div class="description">
    <p>PFX or PKCS12 encoded private key and certificate chain.
pfx is an alternative to providing key and cert individually.
PFX is usually encrypted, if it is, passphrase will be used to decrypt it.</p>
<p>Only a single cert chain is currently supported by the driver.</p>
<p>This is equivalent to setting both <code>cert</code> and <code>key</code> fields</p>
</div>







<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/client-options.ts#L620" target="_blank" rel="noopener">client-options.ts, line 620</a></p></div>






        
            
<h4 class="name" id="rejectUnauthorized"><span class="type-signature"></span>rejectUnauthorized<span class="type-signature"></span></h4>




<div class="description">
    <p>If true the server will reject any connection which is not authorized
with the list of supplied CAs. This option only has an effect if requestCert is true.</p>
<p>Corresponds to <a href="https://docs.openssl.org/master/man3/SSL_CTX_set_verify/">SSL_CTX_set_verify</a></p>
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-default">Default Value:</dt>
    <dd class="tag-default"><ul class="dummy">
            <li>true</li>
        </ul></dd>
    

    
    
    

    

    

    
</dl><div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/client-options.ts#L640" target="_blank" rel="noopener">client-options.ts, line 640</a></p></div>






        
            
<h4 class="name" id="secureOptions"><span class="type-signature"></span>secureOptions<span class="type-signature"></span></h4>




<div class="description">
    <p>Optionally affect the OpenSSL protocol behavior, which is not usually necessary.</p>
<p><strong>This should be used carefully if at all!</strong></p>
<p>Value is a numeric bitmask of the SSL_OP_\* options from OpenSSL Options.</p>
<p>Corresponds to the options parameter in <a href="https://docs.openssl.org/master/man3/SSL_CTX_set_options/">SSL_CTX_set_options</a></p>
</div>







<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/client-options.ts#L631" target="_blank" rel="noopener">client-options.ts, line 631</a></p></div>






        
            
<h4 class="name" id="sigalgs"><span class="type-signature"></span>sigalgs<span class="type-signature"></span></h4>




<div class="description">
    <p>Colon-separated list of supported signature algorithms.
The list can contain digest algorithms (SHA256, MD5 etc.),
public key algorithms (RSA-PSS, ECDSA etc.), combination of both (e.g 'RSA+SHA384')
or TLS v1.3 scheme names (e.g. rsa_pss_pss_sha512).</p>
<p>Corresponds to <a href="https://docs.openssl.org/master/man3/SSL_CTX_set1_sigalgs/">SSL_CTX_set1_sigalgs</a></p>
</div>







<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/client-options.ts#L542" target="_blank" rel="noopener">client-options.ts, line 542</a></p></div></div>
