src/net/cert/internal/verify_name_match_unittest.cc
TEST_P(VerifyNameMatchSimpleTest, ExtraAttrDoesNotMatch) {
  std::string der;
  ASSERT_TRUE(LoadTestData("ascii", value_type(), suffix(), &der));
  std::string der_extra_attr;
  ASSERT_TRUE(LoadTestData("ascii", value_type(), suffix() + "-extra_attr",
                           &der_extra_attr));
  EXPECT_FALSE(VerifyNameMatch(SequenceValueFromString(&der),
                               SequenceValueFromString(&der_extra_attr)));
  EXPECT_FALSE(VerifyNameMatch(SequenceValueFromString(&der_extra_attr),
                               SequenceValueFromString(&der)));
}
// Ensure that a Name does not match another Name which is exactly the same but
// with an extra attribute in one Relative Distinguished Name.
Ensure that a Name does not match another Name which is exactly the same but
with an extra attribute in one Relative Distinguished Name.
Ensure that a Name does not match another Name which is exactly the same but with an extra attribute in one Relative Distinguished Name .
TEST_P(VerifyNameMatchSimpleTest, ExtraAttrDoesNotMatch) {
  std::string der;
  ASSERT_TRUE(LoadTestData("ascii", value_type(), suffix(), &der));
  std::string der_extra_attr;
  ASSERT_TRUE(LoadTestData("ascii", value_type(), suffix() + "-extra_attr",
                           &der_extra_attr));
  EXPECT_FALSE(VerifyNameMatch(SequenceValueFromString(&der),
                               SequenceValueFromString(&der_extra_attr)));
  EXPECT_FALSE(VerifyNameMatch(SequenceValueFromString(&der_extra_attr),
                               SequenceValueFromString(&der)));
}
TEST_P ( VerifyNameMatchSimpleTest , ExtraAttrDoesNotMatch ) { std :: string der ; ASSERT_TRUE ( LoadTestData ( " " , value_type ( ) , suffix ( ) , & der ) ) ; std :: string der_extra_attr ; ASSERT_TRUE ( LoadTestData ( " " , value_type ( ) , suffix ( ) + " " , & der_extra_attr ) ) ; EXPECT_FALSE ( VerifyNameMatch ( SequenceValueFromString ( & der ) , SequenceValueFromString ( & der_extra_attr ) ) ) ; EXPECT_FALSE ( VerifyNameMatch ( SequenceValueFromString ( & der_extra_attr ) , SequenceValueFromString ( & der ) ) ) ; }
Ensure that a Name does not match another Name which is exactly the same but
with an extra attribute in one Relative Distinguished Name.
Ensure that a Name does not match another Name which is exactly the same but with an extra attribute in one Relative Distinguished Name .