<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Unable to store PKI keys in IndexedDB database in Safari 10"
   href="https://bugs.webkit.org/show_bug.cgi?id=162554">162554</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Unable to store PKI keys in IndexedDB database in Safari 10
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>Safari 10
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>macOS 10.12
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>WebKit API
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>oyvind.pedersen&#64;invenia.no
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=289823" name="attach_289823" title="stand-alone html file that shows the problem">attachment 289823</a> <a href="attachment.cgi?id=289823&amp;action=edit" title="stand-alone html file that shows the problem">[details]</a></span>
stand-alone html file that shows the problem

In Safari 10 (at least on Sierra) I am unable to store an RSA KeyPair created by the WebCrypto api in an IndexedDB database. The indexedDB put operation results in a DataCloneError. This works in Safari 9 and Chrome on El Capitan, and on Chrome on Windows. It seems that the CryptoKey object is no longer cloneable in Safari 10. I have also verified that symmetric keys (AES) suffer from the same problem.

I have attached a html file which shows the bug. It alerts &quot;works!&quot; on all the above platforms except on Safari 10, where it shows a DataCloneError instead. On Safari 9, indexedDB cannot be accessed from a file url, so it has to be run from a web server instead, e.g. <a href="https://api-op.developer.ensafer.no/client/app/RSAIndexedDBtest.html">https://api-op.developer.ensafer.no/client/app/RSAIndexedDBtest.html</a>.</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>