Commit 7fc28369 authored by Neel Goyal's avatar Neel Goyal Committed by facebook-github-bot-1

Mark some methods virtual on SSL Context.

Summary:
Mark some methods as virtual.  This makes writing some
better unit tests on the associated task possible.

Reviewed By: siyengar

Differential Revision: D2730126

fb-gh-sync-id: f79f7632e873cb218bb49883d9b53beea7bb96e7
parent 56a2009b
...@@ -409,7 +409,7 @@ class AsyncSSLSocket : public virtual AsyncSocket { ...@@ -409,7 +409,7 @@ class AsyncSSLSocket : public virtual AsyncSocket {
* Determine if the session specified during setSSLSession was reused * Determine if the session specified during setSSLSession was reused
* or if the server rejected it and issued a new session. * or if the server rejected it and issued a new session.
*/ */
bool getSSLSessionReused() const; virtual bool getSSLSessionReused() const;
/** /**
* true if the session was resumed using session ID * true if the session was resumed using session ID
...@@ -425,7 +425,7 @@ class AsyncSSLSocket : public virtual AsyncSocket { ...@@ -425,7 +425,7 @@ class AsyncSSLSocket : public virtual AsyncSocket {
* Returns the cipher used or the constant value "NONE" when no SSL session * Returns the cipher used or the constant value "NONE" when no SSL session
* has been established. * has been established.
*/ */
const char *getNegotiatedCipherName() const; virtual const char* getNegotiatedCipherName() const;
/** /**
* Get the server name for this SSL connection. * Get the server name for this SSL connection.
...@@ -712,7 +712,7 @@ class AsyncSSLSocket : public virtual AsyncSocket { ...@@ -712,7 +712,7 @@ class AsyncSSLSocket : public virtual AsyncSocket {
/** /**
* Returns the time taken to complete a handshake. * Returns the time taken to complete a handshake.
*/ */
std::chrono::nanoseconds getHandshakeTime() const { virtual std::chrono::nanoseconds getHandshakeTime() const {
return handshakeEndTime_ - handshakeStartTime_; return handshakeEndTime_ - handshakeStartTime_;
} }
...@@ -729,7 +729,7 @@ class AsyncSSLSocket : public virtual AsyncSocket { ...@@ -729,7 +729,7 @@ class AsyncSSLSocket : public virtual AsyncSocket {
/** /**
* Returns the peer certificate, or nullptr if no peer certificate received. * Returns the peer certificate, or nullptr if no peer certificate received.
*/ */
std::unique_ptr<X509, X509_deleter> getPeerCert() const { virtual std::unique_ptr<X509, X509_deleter> getPeerCert() const {
if (!ssl_) { if (!ssl_) {
return nullptr; return nullptr;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment