<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <tt>Hello,</tt><br>
    <div class="moz-forward-container">
      <div class="moz-forward-container">
        <div class="moz-forward-container">
          <p><tt> <br>
              I'm working on development of OpenSSL ENGINE that
              integrates<br>
              post-quantum algorithms (new NIDs). During integration I<br>
              need to modify OpenSSL code to add custom function, but
              would<br>
              prefer not to need add anything to OpenSSL code (so engine<br>
              can be dynmicaly loaded by any modern OpenSSL).<br>
            </tt></p>
          <p><tt>So, In three cases, namely when the code is in
              callbacks for keygen,<br>
              encryption and ctrl (called by EVP_PKEY_CTX_ctrl,
              EVP_PKEY_encrypt <br>
              and EVP_PKEY_keygen) I need to get NID of the scheme. The
              problem<br>
              is that, those functions are called with EVP_PKEY_CTX
              object<br>
              provided as an argument. The NID is stored in the <br>
            </tt><tt>EVP_PKEY_CTX->pmeth->pkey_id. I think (AFAIK)
              there is no API<br>
              which would return that value.<br>
              <br>
              I've added a simple function that returns pkey_id from the
              ctx, but<br>
              that means that I need to change OpenSSL code. Is there
              any way<br>
              to get NID without changing OpenSSL?<br>
              <br>
              Kind regards,<br>
              Kris<br>
              <br>
            </tt></p>
          <p><br>
          </p>
        </div>
      </div>
    </div>
  </body>
</html>