title: openssl equivalent to `ippsRSAVerify_PKCS1v15`
body: <p>I am porting some code using Intel IPP lib to OpenSSL (Apple Silicon port).</p>
  <p>I have some code checking an XML file signature that looks like this:</p>
  <pre><code>&lt;Signature xmlns=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
      &lt;SignedInfo&gt;
          &lt;CanonicalizationMethod Algorithm=&quot;http://www.w3.org/TR/2001/REC-xml-c14n-20010315&quot; /&gt;
          &lt;SignatureMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#rsa-sha1&quot; /&gt;
          &lt;Reference URI=&quot;&quot;&gt;
              &lt;Transforms&gt;
                  &lt;Transform Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#enveloped-signature&quot; /&gt;
              &lt;/Transforms&gt;
              &lt;DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot; /&gt;
              &lt;DigestValue&gt;j/cpRUOeyAoW+xF+RzK5rizbWyA=&lt;/DigestValue&gt;
          &lt;/Reference&gt;
      &lt;/SignedInfo&gt;
      &lt;SignatureValue&gt;4dCoh+dB9/YY3pL1wWi6+3h5z52a0R230a4RQraJJFHSys5jndXlYMC3vSz7f2SO0o1AiYFPiSB5wr6OMUlzvTH7StQsG+NcRIJ2OaScjI3rEj497qfeCld+Ko656UfW5aLwxOtG1BW1XVWXJ4eFbD5lgP2161Tw0wV2BdUJlnc=&lt;/SignatureValue&gt;
  &lt;/Signature&gt;
  </code></pre>
  <p>Which appears to be following this spec: <a href="https://www.w3.org/TR/xmldsig-core1/#sec-PKCS1" rel="nofollow noreferrer">https://www.w3.org/TR/xmldsig-core1/#sec-PKCS1</a></p>
  <p>The current implementation uses a call to <a href="https://software.intel.com/content/www/us/en/develop/documentation/ipp-crypto-reference/top/public-key-cryptography-functions/rsa-algorithm-functions/rsa-signature-schemes/pkcs-v1-5-signature-scheme-functions/rsaverify-pkcs1v15.html" rel="nofollow noreferrer"><code>ippsRSAVerify_PKCS1v15</code></a> with the <code>ippHashAlg_SHA1</code> hashAlg argument. I have tried to use OpenSSL’s <a href="https://www.openssl.org/docs/man1.0.2/man3/RSA_verify.html" rel="nofollow noreferrer"><code>RSA_Verify</code></a> with no success. I suppose I’m not giving <code>RSA_Verify</code> the right kind of data, but I have a hard time understanding the different layers in RSA signing. Is there a direct equivalent in OpenSSL for the IPP function, or should I re-implement more steps myself using OpenSSL more primitive functions?</p>