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

Unified Diff: components/cronet/android/cert/cert_verifier_cache_serializer.h

Issue 2021433004: Cert - protobufs to serialize and deserialize CertVerifierCache. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Add_support_for_walking_1999733002
Patch Set: Fix comments Created 4 years, 6 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: components/cronet/android/cert/cert_verifier_cache_serializer.h
diff --git a/components/cronet/android/cert/cert_verifier_cache_serializer.h b/components/cronet/android/cert/cert_verifier_cache_serializer.h
new file mode 100644
index 0000000000000000000000000000000000000000..42e4175200cd19311a253ce707a7b777096c5dc8
--- /dev/null
+++ b/components/cronet/android/cert/cert_verifier_cache_serializer.h
@@ -0,0 +1,32 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_CRONET_ANDROID_CERT_CERT_VERIFIER_CACHE_SERIALIZER_H_
+#define COMPONENTS_CRONET_ANDROID_CERT_CERT_VERIFIER_CACHE_SERIALIZER_H_
+
+namespace cronet_pb {
+class CertVerificationCache;
+} // namespace cronet_pb
+
+namespace net {
+class CachingCertVerifier;
+} // namespace net
+
+namespace cronet {
+
+// Iterates through |verifier|'s cache and returns serialized data. This can be
+// used to populate a new net::CachingCertVerifier with
+// |DeserializeCertVerifierCache()|.
+cronet_pb::CertVerificationCache SerializeCertVerifierCache(
+ const net::CachingCertVerifier& verifier);
+
+// Populates |verifier|'s cache. Returns true if the |cert_cache| is
+// deserialized correctly.
+bool DeserializeCertVerifierCache(
+ const cronet_pb::CertVerificationCache& cert_cache,
+ net::CachingCertVerifier* verifier);
+
+} // namespace cronet
+
+#endif // COMPONENTS_CRONET_ANDROID_CERT_CERT_VERIFIER_CACHE_SERIALIZER_H_
« no previous file with comments | « components/cronet/android/BUILD.gn ('k') | components/cronet/android/cert/cert_verifier_cache_serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698