Index: third_party/WebKit/Source/modules/peerconnection/RTCCertificate.cpp |
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCCertificate.cpp b/third_party/WebKit/Source/modules/peerconnection/RTCCertificate.cpp |
index 25da97fef72217f7da1500badf620efa35702f33..3b7b392ae2b456bffb732407aa8e7ee0fa028c3c 100644 |
--- a/third_party/WebKit/Source/modules/peerconnection/RTCCertificate.cpp |
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCCertificate.cpp |
@@ -30,6 +30,8 @@ |
#include "modules/peerconnection/RTCCertificate.h" |
+#include "platform/bindings/ToV8.h" |
+#include "platform/bindings/V8Binding.h" |
#include "platform/wtf/PtrUtil.h" |
namespace blink { |
@@ -46,4 +48,18 @@ DOMTimeStamp RTCCertificate::expires() const { |
return static_cast<DOMTimeStamp>(certificate_->Expires()); |
} |
+HeapVector<RTCDtlsFingerprint> RTCCertificate::getFingerprints() { |
+ WebVector<WebRTCDtlsFingerprint> web_fingerprints = |
+ certificate_->GetFingerprints(); |
+ DCHECK(!web_fingerprints.IsEmpty()); |
+ HeapVector<RTCDtlsFingerprint> fingerprints(web_fingerprints.size()); |
+ for (size_t i = 0; i < fingerprints.size(); ++i) { |
+ DCHECK(!web_fingerprints[i].Algorithm().IsEmpty()); |
+ DCHECK(!web_fingerprints[i].Value().IsEmpty()); |
+ fingerprints[i].setAlgorithm(web_fingerprints[i].Algorithm()); |
+ fingerprints[i].setValue(web_fingerprints[i].Value()); |
+ } |
+ return fingerprints; |
+} |
+ |
} // namespace blink |