• David Benjamin's avatar
    Request a new client certificate if a cached one is stale. · 76a40adc
    David Benjamin authored
    If an SSLPrivateKey is backed by a smartcard or other interesting
    module, the handle may eventually stop working. In particular, the
    smartcard may be removed at some point.
    
    Ideally, the OS would provide reliable fine-grained signals to clear
    relevant the cache entries, but the OS tends not to provide these APIs.
    We do drop the cache entry on failure, but the user is required to retry
    the operation.
    
    Instead, if an SSLPrivateKey was grabbed from the SSLClientAuthCache,
    assume it is potentially stale. Should the signing operation fail, we
    can not only drop the cache entry, but retry the request.
    
    This CL does not implement this logic for proxy client certificates,
    only server client certificates. Proxy client certificates a missing the
    cache clearing logic (https://crbug.com/814911), so we can fill this in
    once the plumbing is in place.
    
    Along the way, fill in some URLRequest-level client certificate unit
    tests.
    
    Bug: 813022
    Change-Id: I9f0450e9f4df1383dd8b73d0297ebea5e3368fec
    Reviewed-on: https://chromium-review.googlesource.com/935723Reviewed-by: default avatarRyan Sleevi <rsleevi@chromium.org>
    Commit-Queue: David Benjamin <davidben@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#539022}
    76a40adc
http_network_transaction.cc 64.8 KB