<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - REGRESSION (Safari 10): Unable to store WebCrypto keys in IndexedDB database"
   href="https://bugs.webkit.org/show_bug.cgi?id=162554#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - REGRESSION (Safari 10): Unable to store WebCrypto keys in IndexedDB database"
   href="https://bugs.webkit.org/show_bug.cgi?id=162554">bug 162554</a>
              from <span class="vcard"><a class="email" href="mailto:beidson&#64;apple.com" title="Brady Eidson &lt;beidson&#64;apple.com&gt;"> <span class="fn">Brady Eidson</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=162554#c4">comment #4</a>)
<span class="quote">&gt; Using old archive builds we've tracked this to
&gt; <a href="https://trac.webkit.org/changeset/191810">https://trac.webkit.org/changeset/191810</a> (bizarrely)</span >

Never mind this, it's actually because Safari 10 started using WKPageNavigationClient, but does NOT implement the copyWebCryptoMasterKey callback.

Combine that with this code in WK2:
void WebPageProxy::wrapCryptoKey(const Vector&lt;uint8_t&gt;&amp; key, bool&amp; succeeded, Vector&lt;uint8_t&gt;&amp; wrappedKey)
{
    PageClientProtector protector(m_pageClient);

    Vector&lt;uint8_t&gt; masterKey;

    if (m_navigationClient) {
        if (RefPtr&lt;API::Data&gt; keyData = m_navigationClient-&gt;webCryptoMasterKey(*this))
            masterKey = keyData-&gt;dataReference().vector();
    } else if (RefPtr&lt;API::Data&gt; keyData = m_loaderClient-&gt;webCryptoMasterKey(*this))
        masterKey = keyData-&gt;dataReference().vector();
    else if (!getDefaultWebCryptoMasterKey(masterKey)) {
        succeeded = false;
        return;
    }

    succeeded = wrapSerializedCryptoKey(masterKey, key, wrappedKey);
}

If there *is* a nav client but it does *not* return a master key, this always fails.

I think this method should always fallback to the default key.</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>