<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - "X-WOPI-Proof" generation."
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=134041">134041</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>"X-WOPI-Proof" generation.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice Online
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>damian.walkowski@primesoft.pl
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I think that there is a problem with generating "X-WOPI-Proof" header. It works
fine only for the 1st request. Then, it keeps returning the same value each
time. I managed to solve it by tweaking the SignProof method
(wsd/ProofKey.cpp):

std::string Proof::SignProof(const std::vectorchar&gt;& proof) const
{
    assert(m_pKey);
    static Poco::Crypto::RSADigestEngine digestEngine(*m_pKey, "SHA256");
    digestEngine.reset(); #this line fixed the issue
    digestEngine.update(proof.data(), proof.size()); 
    return BytesToBase64(digestEngine.signature());


I'm unsure if fully understand wopi proof key docs, so instead of creating a
merge request, I submit this bug.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>