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

Unified Diff: third_party/WebKit/public/platform/WebRTCCertificate.h

Issue 1949033002: Ability to persist RTCCertificate in IndexedDB (enables cloning). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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: third_party/WebKit/public/platform/WebRTCCertificate.h
diff --git a/third_party/WebKit/public/platform/WebRTCCertificate.h b/third_party/WebKit/public/platform/WebRTCCertificate.h
index c9b7a7584144d4d45bacf1992017d16006a339d2..9e067500c00b6b81ff2e255503d6dc803458a080 100644
--- a/third_party/WebKit/public/platform/WebRTCCertificate.h
+++ b/third_party/WebKit/public/platform/WebRTCCertificate.h
@@ -11,6 +11,29 @@
namespace blink {
+// Corresponds to |rtc::RTCCertificatePEM| in WebRTC.
+// See |WebRTCCertificate::toPEM| and |WebRTCCertificateGenerator::fromPEM|.
+class WebRTCCertificatePEM {
+public:
+ WebRTCCertificatePEM(std::string privateKey, std::string certificate)
+ : m_privateKey(privateKey), m_certificate(certificate)
+ {
+ }
+
+ const std::string& privateKey() const
+ {
+ return m_privateKey;
+ }
+ const std::string& certificate() const
+ {
+ return m_certificate;
+ }
+
+private:
+ std::string m_privateKey;
+ std::string m_certificate;
+};
+
// WebRTCCertificate is an interface defining what Blink needs to know about certificates,
// hiding Chromium and WebRTC layer implementation details. It is possible to create
// shallow copies of the WebRTCCertificate. When all copies are destroyed, the
@@ -26,11 +49,11 @@ public:
// data is freed.
virtual std::unique_ptr<WebRTCCertificate> shallowCopy() const = 0;
- virtual const WebRTCKeyParams& keyParams() const = 0;
-
// Returns the expiration time in ms relative to epoch, 1970-01-01T00:00:00Z.
virtual uint64_t expires() const = 0;
-
+ // Creates a PEM strings representation of the certificate. See also
+ // |WebRTCCertificateGenerator::fromPEM|.
+ virtual WebRTCCertificatePEM toPEM() const = 0;
// Checks if the two certificate objects represent the same certificate value,
// as should be the case for a clone and the original.
virtual bool equals(const WebRTCCertificate& other) const = 0;

Powered by Google App Engine
This is Rietveld 408576698