<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 - Encryption with two or more keys causes General input/output error"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=116351">116351</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Encryption with two or more keys causes General input/output error
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>6.1.0.0.alpha0+ Master
          </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>himajin100000@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Description:
see steps to reproduce

Steps to Reproduce:
1. Create two sets of OpenPGP key pairs ,both for encryption. ( I call them as
<a href="mailto:e1@example.com">e1@example.com</a> and <a href="mailto:e2@example.com">e2@example.com</a>)
2. Run Writer
3. File->Save As
4. Check "Encrypt with GPG keys"
5. Save As "Untitled 1.odt"
6. A dialog with "Select Certificate" as its title appears.
7. Hold Ctrl Key and Select <a href="mailto:e1@example.com">e1@example.com</a> and <a href="mailto:e2@example.com">e2@example.com</a>
8. Click Encrypt

Actual Results:  
A dialog appers. The message there is

Error saving the document Untitled 1:
General Error.
General input/output error.

here you cannot save this file even without GPG keys

Expected Results:
No Error


Reproducible: Always


User Profile Reset: No



Additional Info:
<a href="https://opengrok.libreoffice.org/xref/core/package/source/manifest/ManifestExport.cxx?r=ddd43218#235">https://opengrok.libreoffice.org/xref/core/package/source/manifest/ManifestExport.cxx?r=ddd43218#235</a>
xNewAttrList declared here is not cleared anywhere.

so if you have two or more keys,
<a href="https://opengrok.libreoffice.org/xref/core/package/source/manifest/ManifestExport.cxx?r=ddd43218#272">https://opengrok.libreoffice.org/xref/core/package/source/manifest/ManifestExport.cxx?r=ddd43218#272</a>
<a href="https://opengrok.libreoffice.org/xref/core/package/source/manifest/ManifestImport.cxx?r=ddd43218#69">https://opengrok.libreoffice.org/xref/core/package/source/manifest/ManifestImport.cxx?r=ddd43218#69</a>
<a href="https://opengrok.libreoffice.org/xref/core/package/source/manifest/ManifestDefines.hxx?r=3f775118#46">https://opengrok.libreoffice.org/xref/core/package/source/manifest/ManifestDefines.hxx?r=3f775118#46</a>

it would mean there would be two loext:PGPAlgorithm for the same element. Of
course this is wrong.

if you have enabled dbgutil when you configure before you make your own build,
you can be more sure of that, as you will see an assertion error.
<a href="https://opengrok.libreoffice.org/xref/core/sax/source/expatwrap/saxwriter.cxx?r=0a1d5af2#626">https://opengrok.libreoffice.org/xref/core/sax/source/expatwrap/saxwriter.cxx?r=0a1d5af2#626</a>

there seems no clear() method thing-y for xml::sax::XAttributeList, I will just
remove these declarations and declare them in for-loop that begins at

<a href="https://opengrok.libreoffice.org/xref/core/package/source/manifest/ManifestExport.cxx?r=ddd43218#249">https://opengrok.libreoffice.org/xref/core/package/source/manifest/ManifestExport.cxx?r=ddd43218#249</a>

in the patch I will submit.


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101
Firefox/60.0</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>