#include "cast/common/certificate/cast_crl.h"
#include "cast/common/certificate/cast_cert_validator.h"
#include "cast/common/certificate/date_time.h"
#include "cast/common/certificate/proto/test_suite.pb.h"
#include "cast/common/certificate/testing/test_helpers.h"
#include "cast/common/public/trust_store.h"
#include "gtest/gtest.h"
#include "platform/test/paths.h"
#include "util/osp_logging.h"
#include "util/read_file.h"
namespace openscreen::cast {
namespace {
enum TestStepResult { … };
bool TestVerifyCertificate(TestStepResult expected_result,
const std::vector<std::string>& der_certs,
const DateTime& time,
TrustStore* cast_trust_store) { … }
bool TestVerifyCRL(TestStepResult expected_result,
const std::string& crl_bundle,
const DateTime& time,
TrustStore* crl_trust_store) { … }
bool TestVerifyRevocation(Error::Code expected_result,
const std::vector<std::string>& der_certs,
const std::string& crl_bundle,
const DateTime& crl_time,
const DateTime& cert_time,
bool crl_required,
TrustStore* cast_trust_store,
TrustStore* crl_trust_store) { … }
const std::string& GetSpecificTestDataPath() { … }
bool RunTest(const proto::DeviceCertTest& test_case) { … }
void RunTestSuite(const std::string& test_suite_file_name) { … }
TEST(CastCertificateTest, TestSuite1) { … }
}
}