#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "chrome/common/net/x509_certificate_model.h"
#include <string_view>
#include "net/cert/x509_util.h"
#include "net/test/cert_builder.h"
#include "net/test/cert_test_util.h"
#include "net/test/test_data_directory.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/boringssl/src/pki/parse_certificate.h"
class X509CertificateModel : public testing::TestWithParam<std::string> { … };
Error;
NotPresent;
OptionalStringOrError;
namespace {
std::optional<std::string> FindExtension(
const std::vector<x509_certificate_model::Extension>& extensions,
std::string_view name) { … }
}
TEST_P(X509CertificateModel, InvalidCert) { … }
TEST_P(X509CertificateModel, GetGoogleCertFields) { … }
TEST_P(X509CertificateModel, GetSCTField) { … }
TEST_P(X509CertificateModel, GetNDNCertFields) { … }
TEST_P(X509CertificateModel, PunyCodeCert) { … }
TEST_P(X509CertificateModel, SubjectAltNameSanityTest) { … }
TEST_P(X509CertificateModel, CertificatePoliciesSanityTest) { … }
TEST_P(X509CertificateModel, CertificatePoliciesInvalidUtf8UserNotice) { … }
TEST_P(X509CertificateModel, GlobalsignComCert) { … }
TEST_P(X509CertificateModel, NSCertComment) { … }
TEST_P(X509CertificateModel, DiginotarCert) { … }
TEST_P(X509CertificateModel, AuthorityKeyIdentifierAllFields) { … }
TEST_P(X509CertificateModel, CrlDpCrlIssuerAndRelativeName) { … }
TEST_P(X509CertificateModel, CrlDpReasons) { … }
TEST_P(X509CertificateModel, AuthorityInfoAccessNonstandardOidAndLocationType) { … }
TEST_P(X509CertificateModel, SubjectIA5StringInvalidCharacters) { … }
TEST_P(X509CertificateModel, SubjectInvalid) { … }
TEST_P(X509CertificateModel, SubjectEmptySequence) { … }
INSTANTIATE_TEST_SUITE_P(…);
TEST(X509CertificateModelTest2, ProcessRawSubjectPublicKeyInfo) { … }