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

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

Issue 2400033005: Use BoringSSL scopers in //net. (Closed)
Patch Set: eroman comments Created 4 years, 2 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
« no previous file with comments | « net/cert/ct_objects_extractor.cc ('k') | net/cert/internal/verify_signed_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/internal/verify_name_match.cc
diff --git a/net/cert/internal/verify_name_match.cc b/net/cert/internal/verify_name_match.cc
index 3cfa4a175860ffd4a34671ff1f7b366063374872..e1cc813e1f82a5cebe3b566ba168077da8fef4d6 100644
--- a/net/cert/internal/verify_name_match.cc
+++ b/net/cert/internal/verify_name_match.cc
@@ -4,13 +4,14 @@
#include "net/cert/internal/verify_name_match.h"
+#include <openssl/bytestring.h>
+#include <openssl/mem.h>
+
#include <algorithm>
#include <vector>
#include "base/strings/string_util.h"
#include "base/tuple.h"
-#include "crypto/auto_cbb.h"
-#include "crypto/scoped_openssl_types.h"
#include "net/cert/internal/parse_name.h"
#include "net/der/input.h"
#include "net/der/parser.h"
@@ -294,7 +295,7 @@ bool NormalizeName(const der::Input& name_rdn_sequence,
// RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
der::Parser rdn_sequence_parser(name_rdn_sequence);
- crypto::AutoCBB cbb;
+ bssl::ScopedCBB cbb;
if (!CBB_init(cbb.get(), 0))
return false;
@@ -316,13 +317,13 @@ bool NormalizeName(const der::Input& name_rdn_sequence,
CBB rdn_cbb;
if (!CBB_add_asn1(cbb.get(), &rdn_cbb, CBS_ASN1_SET))
return false;
- std::vector<crypto::ScopedOpenSSLBytes>
+ std::vector<bssl::UniquePtr<uint8_t>>
scoped_encoded_attribute_type_and_values;
std::vector<der::Input> encoded_attribute_type_and_values;
for (const auto& type_and_value : type_and_values) {
// A top-level CBB for encoding each individual AttributeTypeAndValue.
- crypto::AutoCBB type_and_value_encoder_cbb;
+ bssl::ScopedCBB type_and_value_encoder_cbb;
if (!CBB_init(type_and_value_encoder_cbb.get(), 0))
return false;
@@ -367,7 +368,7 @@ bool NormalizeName(const der::Input& name_rdn_sequence,
if (!CBB_finish(type_and_value_encoder_cbb.get(), &bytes, &len))
return false;
scoped_encoded_attribute_type_and_values.push_back(
- crypto::ScopedOpenSSLBytes(bytes));
+ bssl::UniquePtr<uint8_t>(bytes));
encoded_attribute_type_and_values.push_back(der::Input(bytes, len));
}
« no previous file with comments | « net/cert/ct_objects_extractor.cc ('k') | net/cert/internal/verify_signed_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698