src/net/cert/internal/verify_name_match_unittest.cc
TEST(VerifyNameMatchRDNSorting, DuplicateTypes) {
  std::string a;
  ASSERT_TRUE(LoadTestData("ascii", "mixed", "rdn_dupetype_sorting_1", &a));
  std::string b;
  ASSERT_TRUE(LoadTestData("ascii", "mixed", "rdn_dupetype_sorting_2", &b));
  EXPECT_TRUE(VerifyNameMatch(SequenceValueFromString(&a),
                              SequenceValueFromString(&b)));
  EXPECT_TRUE(VerifyNameMatch(SequenceValueFromString(&b),
                              SequenceValueFromString(&a)));
}
// Matching should succeed when the RDNs are sorted differently but are still
// equal after normalizing, even in malformed RDNs that contain multiple
// elements with the same type.
Matching should succeed when the RDNs are sorted differently but are still
equal after normalizing, even in malformed RDNs that contain multiple
elements with the same type.
Matching should succeed when the RDNs are sorted differently but are still equal after normalizing even in malformed RDNs that contain multiple elements with the same type .
TEST(VerifyNameMatchRDNSorting, DuplicateTypes) {
  std::string a;
  ASSERT_TRUE(LoadTestData("ascii", "mixed", "rdn_dupetype_sorting_1", &a));
  std::string b;
  ASSERT_TRUE(LoadTestData("ascii", "mixed", "rdn_dupetype_sorting_2", &b));
  EXPECT_TRUE(VerifyNameMatch(SequenceValueFromString(&a),
                              SequenceValueFromString(&b)));
  EXPECT_TRUE(VerifyNameMatch(SequenceValueFromString(&b),
                              SequenceValueFromString(&a)));
}
TEST ( VerifyNameMatchRDNSorting , DuplicateTypes ) { std :: string a ; ASSERT_TRUE ( LoadTestData ( " " , " " , " " , & a ) ) ; std :: string b ; ASSERT_TRUE ( LoadTestData ( " " , " " , " " , & b ) ) ; EXPECT_TRUE ( VerifyNameMatch ( SequenceValueFromString ( & a ) , SequenceValueFromString ( & b ) ) ) ; EXPECT_TRUE ( VerifyNameMatch ( SequenceValueFromString ( & b ) , SequenceValueFromString ( & a ) ) ) ; }
Matching should succeed when the RDNs are sorted differently but are still
equal after normalizing, even in malformed RDNs that contain multiple
elements with the same type.
Matching should succeed when the RDNs are sorted differently but are still equal after normalizing even in malformed RDNs that contain multiple elements with the same type .