Index: net/cert/ct_serialization.h |
diff --git a/net/cert/ct_serialization.h b/net/cert/ct_serialization.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..374ef39359d12665cf11ed49563bd4745340b1f5 |
--- /dev/null |
+++ b/net/cert/ct_serialization.h |
@@ -0,0 +1,47 @@ |
+// Copyright (c) 2013 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 NET_CERT_CT_SERIALIZATION_H_ |
+#define NET_CERT_CT_SERIALIZATION_H_ |
+ |
+#include <string> |
+#include <vector> |
+ |
+#include "base/strings/string_piece.h" |
+#include "net/base/net_export.h" |
+#include "net/cert/signed_certificate_timestamp.h" |
+ |
+namespace net { |
+ |
+// Utility functions for encoding/decoding structures used by Certificate |
+// Transparency to/from the TLS wire format encoding. |
+namespace ct { |
+ |
+NET_EXPORT_PRIVATE bool EncodeDigitallySigned(const DigitallySigned& input, |
+ std::string* output); |
+ |
+NET_EXPORT_PRIVATE bool DecodeDigitallySigned(base::StringPiece* input, |
wtc
2013/10/24 23:14:23
Since |input| is not const, I guess it is used as
Eran M. (Google)
2013/10/30 18:00:08
Done - moved the documentation from the .cc file.
|
+ DigitallySigned* output); |
+ |
+NET_EXPORT_PRIVATE bool EncodeLogEntry(const LogEntry& input, |
+ std::string* output); |
+ |
+NET_EXPORT_PRIVATE bool EncodeV1SCTSignedData( |
+ const base::Time& timestamp, |
+ const std::string& serialized_log_entry, |
+ const std::string& extensions, |
+ std::string* output); |
+ |
+NET_EXPORT_PRIVATE bool DecodeSCTList(base::StringPiece* input, |
+ std::vector<base::StringPiece>* output); |
wtc
2013/10/24 23:14:23
This function should be documented. Ideally, every
Eran M. (Google)
2013/10/30 18:00:08
Done - moved the documentation.
|
+ |
+NET_EXPORT_PRIVATE bool DecodeSignedCertificateTimestamp( |
+ base::StringPiece* input, |
+ ct::SignedCertificateTimestamp* output); |
+ |
+} // namespace ct |
+ |
+} // namespace net |
+ |
+#endif // NET_CERT_CT_SERIALIZATION_H_ |