| Index: net/cert/internal/test_helpers.h
|
| diff --git a/net/cert/internal/test_helpers.h b/net/cert/internal/test_helpers.h
|
| index 0e4cd17a58d8bd4f259a1b9267738858bf23b7ae..0cd2f70d2c54ffd70eb8a59e9028ff5f57df5f81 100644
|
| --- a/net/cert/internal/test_helpers.h
|
| +++ b/net/cert/internal/test_helpers.h
|
| @@ -76,17 +76,33 @@ template <size_t N>
|
| return ReadTestDataFromPemFile(file_path_ascii, mappings, N);
|
| }
|
|
|
| -// Reads a test case from |file_path_ascii| (which is relative to //src). Test
|
| -// cases are comprised of a certificate chain, trust anchor, a timestamp to
|
| -// validate at, and the expected result of verification.
|
| +// Test cases are comprised of all the parameters to certificate
|
| +// verification, as well as the expected outputs.
|
| +struct VerifyCertChainTest {
|
| + VerifyCertChainTest();
|
| + ~VerifyCertChainTest();
|
| +
|
| + // The chain of certificates (with the zero-th being the target).
|
| + ParsedCertificateList chain;
|
| +
|
| + // The trust anchor to use when verifying the chain.
|
| + scoped_refptr<TrustAnchor> trust_anchor;
|
| +
|
| + // The time to use when verifying the chain.
|
| + der::GeneralizedTime time;
|
| +
|
| + // The expected result from verification.
|
| + bool expected_result = false;
|
| +
|
| + // The expected errors from verification (as a string).
|
| + std::string expected_errors;
|
| +};
|
| +
|
| +// Reads a test case from |file_path_ascii| (which is relative to //src).
|
| // Generally |file_path_ascii| will start with:
|
| // net/data/verify_certificate_chain_unittest/
|
| void ReadVerifyCertChainTestFromFile(const std::string& file_path_ascii,
|
| - ParsedCertificateList* chain,
|
| - scoped_refptr<TrustAnchor>* trust_anchor,
|
| - der::GeneralizedTime* time,
|
| - bool* verify_result,
|
| - std::string* expected_errors);
|
| + VerifyCertChainTest* test);
|
|
|
| // Reads a data file relative to the src root directory.
|
| std::string ReadTestFileToString(const std::string& file_path_ascii);
|
|
|