private void verifyEmbeddedSCTs(List<SignedCertificateTimestamp> scts,
            OpenSSLX509Certificate[] chain, VerificationResult result) {
        // Avoid creating the cert entry if we don't need it
        if (scts.isEmpty()) {
            return;
        }

        CertificateEntry precertEntry = null;
        if (chain.length >= 2) {
            OpenSSLX509Certificate leaf = chain[0];
            OpenSSLX509Certificate issuer = chain[1];

            try {
                precertEntry = CertificateEntry.createForPrecertificate(leaf, issuer);
            } catch (CertificateException e) {
                // Leave precertEntry as null, we handle it just below
            }
        }

        if (precertEntry == null) {
            markSCTsAsInvalid(scts, result);
            return;
        }

        verifySCTs(scts, precertEntry, result);
    }
Verify a list of SCTs which were embedded from an X509 certificate.
The result of the verification for each sct is added to {@code result}.
common/src/main/java/org/conscrypt/ct/Verifier.java