<p>Thanks for the comments, I summarize actionable items at the bottom as the conversation develops. I can push further commits, and do the final squash when it can be accepted.</p>
<ol>
<li>
<p>Preprocessor defines <code>OPENSSL_NO_ENGINE</code> - followed nginx and HAProxy where they use this to omit compile-time code that uses OpenSSL <code>ENGINE_xxxx</code> functions. Frankly I doubt any modern OpenSSL actually defines this. Same purpose as <code>OPENSSL_NO_ECDH</code> in existing <code>tls.c</code>.</p>
<p>At runtime it might be difficult as the symbol won't be in the users <code>libcrypto.so</code>. If we include these symbols, then the users <code>libcrypto.so</code> is required to have engine support (even if they don't use it)</p>
<p>Currently the runtime use is controlled by the proposed modparam <code>engine</code>, but ENGINE symbols are still UND in <code>tls.so</code>.</p>
</li>
<li>
<p>whitespace - added to TODO list below: it was a code editor setting, my bad</p>
</li>
<li>
<p>documentation - added to TODO list</p>
</li>
</ol>
<p>Sample nginx code (because of <code>ENGINE_*</code> symbols). HAProxy has similar constructs:</p>
<pre><code>#ifndef OPENSSL_NO_ENGINE
        u_char      *p, *last;
        ENGINE      *engine;
        EVP_PKEY    *pkey;
        p = key->data + sizeof("engine:") - 1;
        last = (u_char *) ngx_strchr(p, ':');
        if (last == NULL) {
            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
                               "invalid syntax in \"%V\"", key);
            return NGX_ERROR;
        }
        *last = '\0';
        engine = ENGINE_by_id((char *) p);
</code></pre>
<p>TODO list:</p>
<ul>
<li>revert code editor gratuitous whitespace changes</li>
<li>documentation updates for new configuration directives</li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/1484#issuecomment-374443429">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZRZw7srT9hAEnASiDGZSgxdDP-79ks5tgF5fgaJpZM4SsL5H">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZeLLUCk4RNysefRCRNrj4KyqgPcAks5tgF5fgaJpZM4SsL5H.gif" height="1" width="1" alt="" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/pull/1484#issuecomment-374443429"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@aalba6675 in #1484: Thanks for the comments, I summarize actionable items at the bottom as the conversation develops. I can push further commits, and do the final squash when it can be accepted.\r\n\r\n1. Preprocessor defines `OPENSSL_NO_ENGINE` - followed nginx and HAProxy where they use this to omit compile-time code that uses OpenSSL `ENGINE_xxxx` functions. Frankly I doubt any modern OpenSSL actually defines this. Same purpose as `OPENSSL_NO_ECDH` in existing `tls.c`.\r\n\r\n    At runtime it might be difficult as the symbol won't be in the users `libcrypto.so`. If we include these symbols, then the users `libcrypto.so` is required to have engine support (even if they don't use it)\r\n\r\n    Currently the runtime use is controlled by the proposed modparam `engine`, but ENGINE symbols are still UND in `tls.so`.\r\n\r\n1.  whitespace - added to TODO list below: it was a code editor setting, my bad\r\n1. documentation - added to TODO list\r\n\r\nSample nginx code (because of `ENGINE_*` symbols). HAProxy has similar constructs:\r\n```\r\n#ifndef OPENSSL_NO_ENGINE\r\n        u_char      *p, *last;\r\n        ENGINE      *engine;\r\n        EVP_PKEY    *pkey;\r\n        p = key-\u003edata + sizeof(\"engine:\") - 1;\r\n        last = (u_char *) ngx_strchr(p, ':');\r\n        if (last == NULL) {\r\n            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\r\n                               \"invalid syntax in \\\"%V\\\"\", key);\r\n            return NGX_ERROR;\r\n        }\r\n        *last = '\\0';\r\n        engine = ENGINE_by_id((char *) p);\r\n```\r\n\r\nTODO list:\r\n* revert code editor gratuitous whitespace changes\r\n* documentation updates for new configuration directives"}],"action":{"name":"View Pull Request","url":"https://github.com/kamailio/kamailio/pull/1484#issuecomment-374443429"}}}</script>