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

Unified Diff: chromeos/network/onc/onc_translator.h

Issue 16946002: Resolve certificate references in ONC by PEM. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed tests. Created 7 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: chromeos/network/onc/onc_translator.h
diff --git a/chromeos/network/onc/onc_translator.h b/chromeos/network/onc/onc_translator.h
index 270247c65c199d7c2a243ef4d6af79f7b5173310..8446cda007e0d48716a8c25c7c42adc0ba9af651 100644
--- a/chromeos/network/onc/onc_translator.h
+++ b/chromeos/network/onc/onc_translator.h
@@ -5,6 +5,9 @@
#ifndef CHROMEOS_NETWORK_ONC_ONC_TRANSLATOR_H_
#define CHROMEOS_NETWORK_ONC_ONC_TRANSLATOR_H_
+#include <string>
+
+#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
#include "chromeos/chromeos_export.h"
@@ -17,6 +20,12 @@ namespace onc {
struct OncValueSignature;
+// For a Server or CA certificate reference |fingerprint| (hexadecimal encoded
+// SHA1 fingerprint), returns the PEM encoding of the certificate. Returns an
+// empty string, if the reference cannot be resolved.
+typedef base::Callback<std::string(const std::string& fingerprint)>
+ FingerprintToPEM;
+
// Translates a hierarchical ONC dictionary |onc_object| to a flat Shill
// dictionary. The |signature| declares the type of |onc_object| and must point
// to one of the signature objects in "onc_signature.h". The resulting Shill
@@ -27,7 +36,8 @@ struct OncValueSignature;
CHROMEOS_EXPORT
scoped_ptr<base::DictionaryValue> TranslateONCObjectToShill(
const OncValueSignature* signature,
- const base::DictionaryValue& onc_object);
+ const base::DictionaryValue& onc_object,
+ const FingerprintToPEM& fingerprint_to_pem);
// Translates a |shill_dictionary| to an ONC object according to the given
// |onc_signature|. |onc_signature| must point to a signature object in

Powered by Google App Engine
This is Rietveld 408576698