title: 'No Shared Cipher' Error with EDH-RSA-DES-CBC3-SHA
body: <p>I wanted to test TLS 1.0 connection with cipher EDH-RSA-DES-CBC3-SHA.</p>
  <p>I test with openssl s_server and s_client. Works fine. Connection and data exchanges are fine.</p>
  <blockquote>
  <p>openssl s_server -accept 4433 -cert server.pem -key serverkey.pem -cipher EDH-RSA-DES-CBC3-SHA  -tls1</p>
  <p>openssl s_client -connect 127.0.0.1:443 -cipher EDH-RSA-DES-CBC3-SHA -tls1</p>
  <p>Shared ciphers:EDH-RSA-DES-CBC3-SHA</p>
  </blockquote>
  <p>Now, I have another simple OpenSSL server code. With this and s_client the connection fails with server throwing the following:</p>
  <blockquote>
  <p>3077613304:error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher:s3_srvr.c:1361</p>
  </blockquote>
  <p>I check that the libraries that s_server/s_client use and my server application use are same as follows:</p>
  <p><code>cat /proc/9515/maps | awk '{print $6}' | grep '\.so' | sort | uniq | grep -e ssl -e libcrypto</code></p>
  <blockquote>
  <p>/usr/lib/libcrypto.so.1.0.1e</p>
  <p>/usr/lib/libssl.so.1.0.1e</p>
  </blockquote>
  <p>However, <em>for other ciphers like AES128-SHA, connection from s_client to my server application is fine.</em></p>
  <p>Here is how I set up <code>ctx</code> in my server code:</p>
  <pre><code>SSL_CTX* InitServerCTX(void)
  {
      SSL_CTX *ctx = NULL;
      SSL_library_init();
      OpenSSL_add_all_algorithms();
      SSL_load_error_strings(); 
      
      ctx = SSL_CTX_new(TLSv1_server_method());
      SSL_CTX_set_cipher_list(ctx,&quot;EDH-RSA-DES-CBC3-SHA&quot;); // Returns 1
      
      SSL_CTX_use_certificate_chain_file(ctx, &quot;server.pem&quot;);
      SSL_CTX_use_PrivateKey_file(ctx, &quot;serverkey.pem&quot;, SSL_FILETYPE_PEM);
      
      return ctx;
  }
  </code></pre>
  <p>Why does my server application throw up 'No shared cipher' error and s_server is fine with same client?</p>