Refactor: Renaming ssl_cert_chain to GetSSLCertificateChain()

Underscore methods in the middle of classes is against the chromium style guide
this change is part of a long series of changes to refactor crypto code in
WebRTC to conform to the chromium standard better.

1. ssl_cert() -> GetSSLCertificate()
2. ssl_cert_chain() -> GetSSLCertificateChain()
3. Small tidying up in rtccertificategenerator.cc

Bug: webrtc:9860
Change-Id: I670f76e31d6d4f873034edb72d958b3c227379cb
Reviewed-on: https://webrtc-review.googlesource.com/c/107802
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25371}
diff --git a/rtc_base/rtccertificate.cc b/rtc_base/rtccertificate.cc
index 17c1575..875068f 100644
--- a/rtc_base/rtccertificate.cc
+++ b/rtc_base/rtccertificate.cc
@@ -32,7 +32,7 @@
 RTCCertificate::~RTCCertificate() {}
 
 uint64_t RTCCertificate::Expires() const {
-  int64_t expires = ssl_certificate().CertificateExpirationTime();
+  int64_t expires = GetSSLCertificate().CertificateExpirationTime();
   if (expires != -1)
     return static_cast<uint64_t>(expires) * kNumMillisecsPerSec;
   // If the expiration time could not be retrieved return an expired timestamp.
@@ -43,17 +43,22 @@
   return Expires() <= now;
 }
 
+const SSLCertificate& RTCCertificate::GetSSLCertificate() const {
+  return identity_->certificate();
+}
+
+// Deprecated: TODO(benwright) - Remove once chromium is updated.
 const SSLCertificate& RTCCertificate::ssl_certificate() const {
   return identity_->certificate();
 }
 
-const SSLCertChain& RTCCertificate::ssl_cert_chain() const {
+const SSLCertChain& RTCCertificate::GetSSLCertificateChain() const {
   return identity_->cert_chain();
 }
 
 RTCCertificatePEM RTCCertificate::ToPEM() const {
   return RTCCertificatePEM(identity_->PrivateKeyToPEMString(),
-                           ssl_certificate().ToPEMString());
+                           GetSSLCertificate().ToPEMString());
 }
 
 scoped_refptr<RTCCertificate> RTCCertificate::FromPEM(