Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1639)

Unified Diff: net/cert/internal/test_helpers.cc

Issue 1279963003: Add a function for parsing RFC 5280's "TBSCertificate". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cert_mapper
Patch Set: more reformatting Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/cert/internal/test_helpers.cc
diff --git a/net/cert/internal/test_helpers.cc b/net/cert/internal/test_helpers.cc
index 91feb80604f505b3f98d9d929317272d6eeb0ea3..0b5363d8acc7da720b37c2698226f91a189a9c0a 100644
--- a/net/cert/internal/test_helpers.cc
+++ b/net/cert/internal/test_helpers.cc
@@ -83,7 +83,7 @@ der::Input InputFromString(const std::string* s) {
// Ensure that all specified blocks were found.
for (const auto& mapping : mappings_copy) {
- if (mapping.value) {
+ if (mapping.value && !mapping.optional) {
return ::testing::AssertionFailure() << "PEM block missing: "
<< mapping.block_name;
}

Powered by Google App Engine
This is Rietveld 408576698