# 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.6.1/lib/client-options.js#L246" target="_blank" rel="noopener">client-options.js, line 246</a></p></div>




















    
    

    

    

    

    

    

    

    
        </div>

## Members

<div class="jsdoc-content">

        
            
<h4 class="name" id="ca"><span class="type-signature">(nullable) </span>ca<span class="type-signature"> :string|Buffer|Array&lt;(string|Buffer)></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>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">string</span>
|

<span class="param-type">Buffer</span>
|

<span class="param-type">Array&lt;(string|Buffer)></span>


        </li>
    </ul>





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






        
            
<h4 class="name" id="cert"><span class="type-signature">(nullable) </span>cert<span class="type-signature"> :string|Buffer</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>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">string</span>
|

<span class="param-type">Buffer</span>


        </li>
    </ul>





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






        
            
<h4 class="name" id="ciphers"><span class="type-signature">(nullable) </span>ciphers<span class="type-signature"> :string</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>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">string</span>


        </li>
    </ul>





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






        
            
<h4 class="name" id="ecdhCurve"><span class="type-signature">(nullable) </span>ecdhCurve<span class="type-signature"> :string</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>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">string</span>


        </li>
    </ul>





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






        
            
<h4 class="name" id="honorCipherOrder"><span class="type-signature">(nullable) </span>honorCipherOrder<span class="type-signature"> :boolean</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>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">boolean</span>


        </li>
    </ul>





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






        
            
<h4 class="name" id="key"><span class="type-signature">(nullable) </span>key<span class="type-signature"> :string|Buffer</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>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">string</span>
|

<span class="param-type">Buffer</span>


        </li>
    </ul>





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






        
            
<h4 class="name" id="maxVersion"><span class="type-signature">(nullable) </span>maxVersion<span class="type-signature"> :'TLSv1.3'|'TLSv1.2'|'TLSv1.1'|'TLSv1'</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>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">'TLSv1.3'</span>
|

<span class="param-type">'TLSv1.2'</span>
|

<span class="param-type">'TLSv1.1'</span>
|

<span class="param-type">'TLSv1'</span>


        </li>
    </ul>





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






        
            
<h4 class="name" id="minVersion"><span class="type-signature">(nullable) </span>minVersion<span class="type-signature"> :'TLSv1.3'|'TLSv1.2'|'TLSv1.1'|'TLSv1'</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>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">'TLSv1.3'</span>
|

<span class="param-type">'TLSv1.2'</span>
|

<span class="param-type">'TLSv1.1'</span>
|

<span class="param-type">'TLSv1'</span>


        </li>
    </ul>





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






        
            
<h4 class="name" id="passphrase"><span class="type-signature">(nullable) </span>passphrase<span class="type-signature"> :string</span></h4>




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



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">string</span>


        </li>
    </ul>





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






        
            
<h4 class="name" id="pfx"><span class="type-signature">(nullable) </span>pfx<span class="type-signature"> :string|Buffer</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>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">string</span>
|

<span class="param-type">Buffer</span>


        </li>
    </ul>





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






        
            
<h4 class="name" id="rejectUnauthorized"><span class="type-signature">(nullable) </span>rejectUnauthorized<span class="type-signature"> :boolean</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>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">boolean</span>


        </li>
    </ul>





<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.6.1/lib/client-options.js#L397" target="_blank" rel="noopener">client-options.js, line 397</a></p></div>






        
            
<h4 class="name" id="secureOptions"><span class="type-signature">(nullable) </span>secureOptions<span class="type-signature"> :number</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>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">number</span>


        </li>
    </ul>





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






        
            
<h4 class="name" id="sigalgs"><span class="type-signature">(nullable) </span>sigalgs<span class="type-signature"> :string</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>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">string</span>


        </li>
    </ul>





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