public void handleTrustStorageUpdate() {
        if (acceptedIssuers == null) {
            trustedCertificateIndex.reset();
        } else {
            trustedCertificateIndex.reset(trustAnchors(acceptedIssuers));
        }
    }
Validates whether a server is trusted. If session is given and non-null
it also checks if chain is pinned appropriately for that peer host. If
null, it does not check for pinned certs. The return value is a list of
the certificates used for making the trust decision.
common/src/main/java/org/conscrypt/TrustManagerImpl.java