[Webkit-unassigned] [Bug 162554] REGRESSION (Safari 10): Unable to store WebCrypto keys in IndexedDB database

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 29 16:24:05 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=162554

--- Comment #5 from Brady Eidson <beidson at apple.com> ---
(In reply to comment #4)
> Using old archive builds we've tracked this to
> https://trac.webkit.org/changeset/191810 (bizarrely)

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160929/ac3372a7/attachment-0001.html>


More information about the webkit-unassigned mailing list