Index: chromeos/network/onc/onc_utils.h |
diff --git a/chromeos/network/onc/onc_utils.h b/chromeos/network/onc/onc_utils.h |
index 6a6d273fe62f13d27682e98b4999c355330b91b8..47fe3a1dec69c6fbf8e250c3291c846caac5a9bc 100644 |
--- a/chromeos/network/onc/onc_utils.h |
+++ b/chromeos/network/onc/onc_utils.h |
@@ -8,9 +8,11 @@ |
#include <string> |
#include "base/basictypes.h" |
+#include "base/memory/ref_counted.h" |
#include "base/memory/scoped_ptr.h" |
#include "chromeos/chromeos_export.h" |
#include "chromeos/network/onc/onc_constants.h" |
+#include "net/cert/x509_certificate.h" |
namespace base { |
class DictionaryValue; |
@@ -49,8 +51,8 @@ class CHROMEOS_EXPORT StringSubstitution { |
virtual ~StringSubstitution() {} |
// Returns the replacement string for |placeholder| in |
- // |substitute|. Currently, onc::substitutes::kLoginIDField and |
- // onc::substitutes::kEmailField are supported. |
+ // |substitute|. Currently, substitutes::kLoginIDField and |
+ // substitutes::kEmailField are supported. |
virtual bool GetSubstitute(std::string placeholder, |
std::string* substitute) const = 0; |
private: |
@@ -59,8 +61,8 @@ class CHROMEOS_EXPORT StringSubstitution { |
// Replaces all expandable fields that are mentioned in the ONC |
// specification. The object of |onc_object| is modified in place. Currently |
-// onc::substitutes::kLoginIDField and onc::substitutes::kEmailField are |
-// expanded. The replacement strings are obtained from |substitution|. |
+// substitutes::kLoginIDField and substitutes::kEmailField are expanded. The |
+// replacement strings are obtained from |substitution|. |
CHROMEOS_EXPORT void ExpandStringsInOncObject( |
const OncValueSignature& signature, |
const StringSubstitution& substitution, |
@@ -81,11 +83,17 @@ CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue> MaskCredentialsInOncObject( |
// output lists and should be further processed by the caller. |
CHROMEOS_EXPORT bool ParseAndValidateOncForImport( |
const std::string& onc_blob, |
- chromeos::onc::ONCSource onc_source, |
+ ONCSource onc_source, |
const std::string& passphrase, |
base::ListValue* network_configs, |
base::ListValue* certificates); |
+// Parse the given PEM encoded certificate |pem_encoded| and create a |
+// X509Certificate from it. |
+CHROMEOS_EXPORT scoped_refptr<net::X509Certificate> GetCertFromPEMEncoding( |
Mattias Nissler (ping if slow)
2013/06/20 16:15:36
nit: Maybe DecodePEMCertificate would be a more ac
pneubeck (no reviews)
2013/06/21 11:28:00
Done.
|
+ const std::string& pem_encoded, |
+ const std::string& nickname); |
+ |
} // namespace onc |
} // namespace chromeos |