<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@apple.com" title="Brady Eidson <beidson@apple.com>"> <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">> Using old archive builds we've tracked this to
> <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<uint8_t>& key, bool& succeeded, Vector<uint8_t>& wrappedKey)
{
PageClientProtector protector(m_pageClient);
Vector<uint8_t> masterKey;
if (m_navigationClient) {
if (RefPtr<API::Data> keyData = m_navigationClient->webCryptoMasterKey(*this))
masterKey = keyData->dataReference().vector();
} else if (RefPtr<API::Data> keyData = m_loaderClient->webCryptoMasterKey(*this))
masterKey = keyData->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>