Note that there are some explanatory texts on larger screens.

plurals
  1. POboost asio with ECDSA certificate issue
    primarykey
    data
    text
    <p>I am implementing SSL server using boost::asio.</p> <p>The context initialization is shown in below code</p> <pre><code> boost::asio::ssl::context_base::method SSL_version = static_cast&lt;boost::asio::ssl::context_base::method&gt;(param_values[ID_PROTOCOL_VERSION].int32_value); // load certificate files boost::shared_ptr&lt;boost::asio::ssl::context&gt; context_ = boost::shared_ptr&lt;boost::asio::ssl::context&gt;( new boost::asio::ssl::context(SSL_version)); p_ctx = boost::static_pointer_cast&lt;void&gt;(context_); context_-&gt;set_options(boost::asio::ssl::context::default_workarounds); context_-&gt;use_certificate_chain_file(cert_chain_file); context_-&gt;use_certificate_file(cert_file, boost::asio::ssl::context::pem); context_-&gt;use_private_key_file(cert_file, boost::asio::ssl::context::pem); context_-&gt;set_verify_mode(boost::asio::ssl::verify_peer | boost::asio::ssl::verify_fail_if_no_peer_cert); context_-&gt;set_verify_callback(boost::bind(&amp;verify_certificate_cb, _1, _2)); if (param_values[ID_CIPHER_LIST].int32_value != 0) { std::string cipher_list = ""; generate_cipher_list(param_values[ID_CIPHER_LIST].int32_value, cipher_list); MA5G_logger::log(PRIORITY_INFO, "Supported cipher list %s", cipher_list.c_str()); SSL_CTX_set_cipher_list((reinterpret_cast&lt;boost::asio::ssl::context*&gt;(p_ctx.get()))-&gt;native_handle(), cipher_list.c_str()); } </code></pre> <p>in the <code>cipher_list</code>, I am supporting below list</p> <pre><code>AES128-SHA:AES256-SHA:AES128-SHA256:AES256-SHA256:AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA </code></pre> <p>With <code>ECDSA</code> certificates if I use <code>cipher_list</code> given above then client can not connect to the server and gives error <code>"No shared cipher"</code>. But if I do not give <code>cipher_list</code> then the client can successfully connect to the server. The same cipher list works fine with <code>RSA</code> certificates.</p> <p>The same ECDSA certificates work fine if I use <code>openssl s_server</code> with <code>-cipher</code> option to provide supported <code>cipher_list</code></p> <p>Can anyone help with this issue?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload