Expose SSL ciphersuite on the webrtc::DtlsTransport interface
This allows the ciphersuite to be accessed from Blink code, which is
useful if we want to emit deprecation messages.
Bug: none
Change-Id: Idcf1f5402948406e4cf7c6e54b67a622a1a403ec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132004
Reviewed-by: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27581}
diff --git a/api/dtls_transport_interface.h b/api/dtls_transport_interface.h
index 0270043..1170e0f 100644
--- a/api/dtls_transport_interface.h
+++ b/api/dtls_transport_interface.h
@@ -14,6 +14,7 @@
#include <memory>
#include <utility>
+#include "absl/types/optional.h"
#include "api/ice_transport_interface.h"
#include "api/rtc_error.h"
#include "api/scoped_refptr.h"
@@ -42,6 +43,7 @@
explicit DtlsTransportInformation(DtlsTransportState state);
DtlsTransportInformation(
DtlsTransportState state,
+ absl::optional<int> ssl_cipher_suite,
std::unique_ptr<rtc::SSLCertChain> remote_ssl_certificates);
// Copy and assign
DtlsTransportInformation(const DtlsTransportInformation& c);
@@ -52,6 +54,7 @@
default;
DtlsTransportState state() const { return state_; }
+ absl::optional<int> ssl_cipher_suite() const { return ssl_cipher_suite_; }
// The accessor returns a temporary pointer, it does not release ownership.
const rtc::SSLCertChain* remote_ssl_certificates() const {
return remote_ssl_certificates_.get();
@@ -59,6 +62,7 @@
private:
DtlsTransportState state_;
+ absl::optional<int> ssl_cipher_suite_;
std::unique_ptr<rtc::SSLCertChain> remote_ssl_certificates_;
};