title: Nodejs how to obtain TLS object from https server
body: <p>I am using a https server using nodejs.  For security reasons, I have to change certain ssl parameters.  More specifically, I have to set/disable "client renegotiation limit".</p>
  
  <p>As per the standard documentation <a href="https://nodejs.org/api/tls.html#tls_client_initiated_renegotiation_attack_mitigation" rel="nofollow noreferrer">here</a>, i have to set or change tls.CLIENT_RENEG_LIMIT to my value.</p>
  
  <p>Since, I am using https module, I have access to https server.  My question is how to obtain tls object from https server, so that I can set values.</p>
  
  <p>I understand that I can set a few options while creating a https server as below.</p>
  
  <pre><code>const options = {
    key: fs.readFileSync('app-key.pem'),
    cert: fs.readFileSync('app-cert.pem'),
    secureOptions: constants.SSL_OP_NO_SSLV2 | ...,
    ciphers: [...]
  }
  </code></pre>
  
  <p>However, I am unsure what exactly to set if I were to add values for tls.CLIENT_RENEG_LIMIT, or tls.CLIENT_RENEG_WINDOW etc.  I am assuming there would be some way to obtain a tls handle through which I can set these.</p>
  
  <p>Any help here...?</p>