<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    Locking in OpenSSL 1.1.1 and later is completely different.  You no
    longer need to and should not try to register the locking callbacks.<br>
    <br>
    <br>
    Pauli<br>
    <br>
    <div class="moz-cite-prefix">On 17/8/21 11:59 pm, Kumar Mishra,
      Sanjeev wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:SN2PR03MB2319C560812C33EEC9816956A6FE9@SN2PR03MB2319.namprd03.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        Hi All,</div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        I am upgrading the code from OpenSSL 1.0.1 to <span
          style="background-color:rgb(255, 255, 255);display:inline
          !important">OpenSSL 3.0.</span></div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        <span style="background-color:rgb(255, 255, 255);display:inline
          !important"><span
            style="box-sizing:border-box;font-family:"Segoe
            UI", system-ui, "Apple Color Emoji",
            "Segoe UI Emoji", sans-serif;font-size:14px">I am
            getting compilation errors for deprecated functions and
            macros like "CRYPTO_num_locks()" , "<span
              style="box-sizing:border-box">CRYPTO_LOCK" ......etc. But
              there is not any replacement for these functions and
              macros in OpenSSL 3.0. </span></span></span></div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        <span style="background-color:rgb(255, 255, 255);display:inline
          !important"><span
            style="box-sizing:border-box;font-family:"Segoe
            UI", system-ui, "Apple Color Emoji",
            "Segoe UI Emoji", sans-serif;font-size:14px"><span
              style="box-sizing:border-box">How can I handle these
              compilation errors ? </span></span></span></div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        <span style="background-color:rgb(255, 255, 255);display:inline
          !important"><span
            style="box-sizing:border-box;font-family:"Segoe
            UI", system-ui, "Apple Color Emoji",
            "Segoe UI Emoji", sans-serif;font-size:14px"><span
              style="box-sizing:border-box">Should I re-write these
              functions doing nothing and macros with any arbitrary
              numbers ?</span></span></span></div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        <span style="background-color:rgb(255, 255, 255);display:inline
          !important"><span
            style="box-sizing:border-box;font-family:"Segoe
            UI", system-ui, "Apple Color Emoji",
            "Segoe UI Emoji", sans-serif;font-size:14px"><span
              style="box-sizing:border-box">In OpenSSL 3.0 source code
              file /include/openssl/crypto.h.in, it is mentioned that to
              handle these functions and macros as "no-ops".</span></span></span></div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        <span style="background-color:rgb(255, 255, 255);display:inline
          !important"><span
            style="box-sizing:border-box;font-family:"Segoe
            UI", system-ui, "Apple Color Emoji",
            "Segoe UI Emoji", sans-serif;font-size:14px"><span
              style="box-sizing:border-box">Could anybody elaborate the
              following comment from source code of OpenSSL 3.0 (<span
                style="background-color:rgb(255, 255,
                255);display:inline !important"><span> </span>/include/openssl/crypto.h.in)</span>
              in details.......</span></span></span></div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        <span style="background-color:rgb(255, 255, 255);display:inline
          !important"><span
            style="box-sizing:border-box;font-family:"Segoe
            UI", system-ui, "Apple Color Emoji",
            "Segoe UI Emoji", sans-serif;font-size:14px"><span
              style="box-sizing:border-box"><br>
            </span></span></span></div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        <span style="background-color:rgb(255, 255, 255);display:inline
          !important"><span
            style="box-sizing:border-box;font-family:"Segoe
            UI", system-ui, "Apple Color Emoji",
            "Segoe UI Emoji", sans-serif;font-size:14px"><span
              style="box-sizing:border-box">
              <div style="box-sizing:border-box">
                <div>/*<br>
                  * The old locking functions have been removed
                  completely without compatibility<br>
                  * macros. This is because the old functions either
                  could not properly report<br>
                  * errors, or the returned error values were not
                  clearly documented.<br>
                  * Replacing the locking functions with no-ops would
                  cause race condition<br>
                  * issues in the affected applications. It is far
                  better for them to fail at<br>
                  * compile time.<br>
                  * On the other hand, the locking callbacks are no
                  longer used. Consequently,<br>
                  * the callback management functions can be safely
                  replaced with no-op macros.<br>
                  */<br>
                  # define CRYPTO_num_locks() (1)<br>
                  # define CRYPTO_set_locking_callback(func)<br>
                  # define CRYPTO_get_locking_callback() (NULL)<br>
                  # define CRYPTO_set_add_lock_callback(func)<br>
                  # define CRYPTO_get_add_lock_callback() (NULL)</div>
                <div>
                  <div>
                    <div>/*<br>
                      * These defines where used in combination with the
                      old locking callbacks,<br>
                      * they are not called anymore, but old code that's
                      not called might still<br>
                      * use them.<br>
                      */<br>
                      # define CRYPTO_LOCK 1<br>
                      # define CRYPTO_UNLOCK 2<br>
                      # define CRYPTO_READ 4<br>
                      # define CRYPTO_WRITE 8</div>
                  </div>
                </div>
              </div>
              .....</span></span></span></div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        <span style="background-color:rgb(255, 255, 255);display:inline
          !important"><span
            style="box-sizing:border-box;font-family:"Segoe
            UI", system-ui, "Apple Color Emoji",
            "Segoe UI Emoji", sans-serif;font-size:14px"><span
              style="box-sizing:border-box">.....</span></span></span></div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        <span style="background-color:rgb(255, 255, 255);display:inline
          !important"><span
            style="box-sizing:border-box;font-family:"Segoe
            UI", system-ui, "Apple Color Emoji",
            "Segoe UI Emoji", sans-serif;font-size:14px"><span
              style="box-sizing:border-box">......</span></span></span></div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        <span style="background-color:rgb(255, 255, 255);display:inline
          !important"><span
            style="box-sizing:border-box;font-family:"Segoe
            UI", system-ui, "Apple Color Emoji",
            "Segoe UI Emoji", sans-serif;font-size:14px"><span
              style="box-sizing:border-box"><br>
            </span></span></span></div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        <span style="background-color:rgb(255, 255, 255);display:inline
          !important"><span
            style="box-sizing:border-box;font-family:"Segoe
            UI", system-ui, "Apple Color Emoji",
            "Segoe UI Emoji", sans-serif;font-size:14px"><span
              style="box-sizing:border-box">Thanks in anticipation,</span></span></span></div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        <span style="background-color:rgb(255, 255, 255);display:inline
          !important"><span
            style="box-sizing:border-box;font-family:"Segoe
            UI", system-ui, "Apple Color Emoji",
            "Segoe UI Emoji", sans-serif;font-size:14px"><span
              style="box-sizing:border-box">Sanjeev Kumar Mishra</span></span></span></div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        <span style="background-color:rgb(255, 255, 255);display:inline
          !important"><span
            style="box-sizing:border-box;font-family:"Segoe
            UI", system-ui, "Apple Color Emoji",
            "Segoe UI Emoji", sans-serif;font-size:14px"><span
              style="box-sizing:border-box"><br>
            </span></span></span></div>
      <br clear="all">
      Notice: This e-mail together with any attachments may contain
      information of Ribbon Communications Inc. and its Affiliates that
      is confidential and/or proprietary for the sole use of the
      intended recipient. Any review, disclosure, reliance or
      distribution by others or forwarding without express permission is
      strictly prohibited. If you are not the intended recipient, please
      notify the sender immediately and then delete all copies,
      including any attachments.<br>
    </blockquote>
    <br>
  </body>
</html>