title: node.js openssl error: dh key too small
body: <p>I'm running into an issue trying to make a soap request using node-soap.
  The error is only on ubuntu, I've tested on windows too - the code (obviously excluding curl) is working there.</p>
  
  <p>The error I get is:</p>
  
  <blockquote>
    <p>Unhandled rejection Error: write EPROTO 140332284700480:error:14082174:SSL routines:ssl3_check_cert_and_algorithm:dh key too small:../deps/openssl/openssl/ssl/s3_clnt.c:3615:</p>
  </blockquote>
  
  <p>I've also tried using <code>request/request</code> which also fails. When using plain curl I get a response from the server I'm trying to connect to. </p>
  
  <p>Here's the code I'm using:</p>
  
  <pre><code>exec('curl ' + url, function(err, res) {
          log(err); // null
          log(res); // expected response
      });  
  
  request.postAsync({
          url,
          rejectUnauthorized: false,
          requestCert: true,
      }).then(val =&gt; {
          log(val);
      }).catch(err =&gt; {
          log(err); // above error message
      })
  
  soap.createClientAsync(url).then(val =&gt; {
          log(val);
      }).catch(err =&gt; {
          log(err); // above error message
      })
  </code></pre>
  
  <p>I've tested on the following versions:</p>
  
  <p>node 4.4.0 and 5.8.0, 
  ubuntu server version 14.04 and ubuntu 15.04 desktop</p>
  
  <p>The openssl version is OpenSSL 1.0.2f  28 Jan 2016 </p>
  
  <p>Can someone help me? Is it possible to make this work somehow?</p>